(self)
return waiting
Number of tones (not gaps) waiting in queue.
Number of tones (not gaps) waiting in queue.
Number of tones ( not gaps ) waiting in queue .
def tones_waiting(self):
        """Number of tones (not gaps) waiting in queue."""
        self._check_expired()
        # count number of notes waiting, exclude the top of queue ("now playing")
        waiting = len([item for i, item in enumerate(self._deque) if item[2] and i])
        # hack: if the most recent item popped was a balloon
        # (i.e. we've just started a PLAY and the first note has not finished)
        # include the first note in the waiting queue length
        waiting += self._balloon_popped
        self._balloon_popped = False
        return waiting
def tones_waiting ( self ) : self . _check_expired ( ) # count number of notes waiting, exclude the top of queue ("now playing") waiting = len ( [ item for i , item in enumerate ( self . _deque ) if item [ 2 ] and i ] ) # hack: if the most recent item popped was a balloon # (i.e. we've just started a PLAY and the first note has not finished) # include the first note in the waiting queue length waiting += self . _balloon_popped self . _balloon_popped = False return waiting