changeset 565:88cffe418201 pyntnclick

Pyflakes sound
author Neil Muller <neil@dip.sun.ac.za>
date Sat, 11 Feb 2012 15:37:59 +0200
parents 2f7aa3cad77c
children ea9dd2b9186a
files pyntnclick/sound.py
diffstat 1 files changed, 15 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/pyntnclick/sound.py	Sat Feb 11 15:35:06 2012 +0200
+++ b/pyntnclick/sound.py	Sat Feb 11 15:37:59 2012 +0200
@@ -34,23 +34,23 @@
 
        Inpsired by the same idea in Albow (by Greg Ewing)"""
 
-   def play(self, *args):
-       pass
+    def play(self, *args):
+        pass
 
-   def stop(self):
-       pass
+    def stop(self):
+        pass
 
-   def get_length(self):
-       return 0.0
+    def get_length(self):
+        return 0.0
 
-   def get_num_channel(self):
-       return 0
+    def get_num_channel(self):
+        return 0
 
-   def get_volume(self):
-       return 0.0
+    def get_volume(self):
+        return 0.0
 
-   def fadeout(self, *args):
-       pass
+    def fadeout(self, *args):
+        pass
 
 
 class Sound(object):
@@ -82,12 +82,12 @@
 
     def get_sound(self, *names):
         if not self.sound_enabled:
-            return dummy_sound
+            return DummySound()
         soundfile = os.path.join(names)
         sound = None
         try:
             path = self._resource_finder("sounds", soundfile)
-            sound = sound_cache.get(path, None)
+            sound = self.sound_cache.get(path, None)
         except ResourceNotFound:
             print "Sound file not found: %s" % soundfile
             # Cache failed lookup
@@ -111,6 +111,7 @@
     def change_playlist(self, new_playlist):
         albow.music.change_playlist(new_playlist)
 
+
 def start_next_music():
     """Start playing the next item from the current playlist immediately."""
     if albow.music.music_enabled and albow.music.current_playlist: