Пример #1
0
 def load(self, filename, loop=True, duration=500):
     music = window.load_sound(filename, loop)
     if music == None: music = window.load_sound(filename, loop)
     if music == None: return music
     if music == self.music:
         self.music = music
         music.fadeIn(duration)
         return music
     try:
         self.music.fadeWith(music, duration)
         self.music = music
         return self.music
     except:
         self.music = music
         music.fadeIn(duration)
         return music
Пример #2
0
 def __init__(self, filename):
     self.snd = window.load_sound(filename)