add support for clearing audio queue

This commit is contained in:
Damien Elmes 2009-01-05 14:38:15 +09:00
parent 2319cbcc71
commit 3e7d3bbf28

View file

@ -64,6 +64,10 @@ def playExternal(path):
manager = QueueMonitor()
manager.start()
def clearQueueExternal():
global queue
queue = []
# Mac audio support
##########################################################################
@ -98,6 +102,10 @@ try:
# new handle
play_(path)
def clearQueueOSX():
global queue
queue = []
def play_(path):
global current
current = NSSound.alloc()
@ -115,5 +123,7 @@ except ImportError:
if sys.platform.startswith("darwin"):
play = playOSX
clearAudioQueue = clearQueueOSX
else:
play = playExternal
clearAudioQueue = clearQueueExternal