def queue(self, s): self.loop = None self.queued = s sound.queue(self.id, s.what, s.serial) with condition: condition.notify()
def queue(self, s, loops=0): self.queued = s sound.queue(self.id, s.file, s.serial) if loops: self.loop = s else: self.loop = None with condition: condition.notify()