Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 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
Exemplo n.º 3
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())
Exemplo n.º 4
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())