def initialize(self): snakesound.open() self.reset_channels() self.loaded = {} self.soundHandles = {} self.musicHandles = {} self.finishedPlayers = [] self.locked = set() self.music = SoundDummy() if MUTED: snakesound.listener.volume = 0.0
import snakesound snakesound.open() print 'opened' def wee(sound): print 'DONE' # sound = snakesound.Sound(open('imteapot.midi', 'rb').read()) sound = snakesound.Sound(filename = 'hey.ogg') print 'Duration:', sound.duration sound.set_callback(wee, sound) sound.play(0) import code code.interact(local = locals())
import snakesound snakesound.open() print 'opened' def wee(sound): print 'DONE' # sound = snakesound.Sound(open('imteapot.midi', 'rb').read()) sound = snakesound.Sound(filename='hey.ogg') print 'Duration:', sound.duration sound.set_callback(wee, sound) sound.play(0) import code code.interact(local=locals())