Mercurial > boomslang
comparison pyntnclick/sound.py @ 570:9c3528c2cbe5 pyntnclick
Bug fixes for sound hook-up.
author | Simon Cross <hodgestar+bzr@gmail.com> |
---|---|
date | Sat, 11 Feb 2012 15:48:06 +0200 |
parents | 88cffe418201 |
children | e393954e3749 |
comparison
equal
deleted
inserted
replaced
569:0587f11ff435 | 570:9c3528c2cbe5 |
---|---|
94 sound = DummySound() | 94 sound = DummySound() |
95 self.sound_cache[path] = sound | 95 self.sound_cache[path] = sound |
96 if sound is None: | 96 if sound is None: |
97 try: | 97 try: |
98 sound = pygame_Sound(path) | 98 sound = pygame_Sound(path) |
99 except pygame.error, e: | 99 except pygame.error: |
100 print "Sound file not found: %s" % soundfile | 100 print "Sound file not found: %s" % soundfile |
101 sound = DummySound() | 101 sound = DummySound() |
102 self.sound_cache[path] = sound | 102 self.sound_cache[path] = sound |
103 return sound | 103 return sound |
104 | 104 |
105 def get_playlist(self, pieces, random=False, repeat=False): | 105 def get_playlist(self, pieces, random=False, repeat=False): |
106 return albow.music.PlayList(pieces, random, repeat) | 106 return albow.music.PlayList(pieces, random, repeat) |
107 | 107 |
108 def get_music(self, name, prefix): | 108 def get_music(self, name, prefix): |
109 return albow.music.get_music(name, prefix) | 109 return albow.music.get_music(name, prefix=prefix) |
110 | 110 |
111 def change_playlist(self, new_playlist): | 111 def change_playlist(self, new_playlist): |
112 albow.music.change_playlist(new_playlist) | 112 albow.music.change_playlist(new_playlist) |
113 | 113 |
114 | 114 |