Mercurial > pyntnclick
diff pyntnclick/sound.py @ 576:1b1ab71535bd pyntnclick
Classify constants, which involves a whole bunch of XXX comments
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 11 Feb 2012 16:02:06 +0200 |
parents | e393954e3749 |
children | ccc26c23d2c1 |
line wrap: on
line diff
--- a/pyntnclick/sound.py Sat Feb 11 16:01:33 2012 +0200 +++ b/pyntnclick/sound.py Sat Feb 11 16:02:06 2012 +0200 @@ -18,7 +18,6 @@ pygame_Sound = None music = None -from pyntnclick.constants import FREQ, BITSIZE, CHANNELS, BUFFER from pyntnclick.resources import ResourceNotFound import albow.music @@ -61,13 +60,16 @@ self.sound_cache = {} self._resource_finder = resource_finder - def enable_sound(self): + def enable_sound(self, constants): """Attempt to initialise the sound system""" if pygame_Sound is None: self.disable_sound(pygame_import_error) return try: - pygame.mixer.init(FREQ, BITSIZE, CHANNELS, BUFFER) + pygame.mixer.init(constants.snd_freq, + constants.snd_bitsize, + constants.snd_channels, + constants.snd_buffer) self.sound_enabled = True except pygame.error, exc: self.disable_sound(exc)