Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/game.py
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-02-17 23:34:37 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-02-17 23:34:37 (GMT)
commit256d8dfd85821aaa810c5aabbcb0076cd8e6a4fe (patch)
tree40ec58d70318d4a31e0a8da68d1c2ca8e9e8510f /game.py
parent89aa01f23e3f89c0d72d4e6d7d82b9c656e1ff30 (diff)
Remove redundant audio checks
Diffstat (limited to 'game.py')
-rw-r--r--game.py23
1 files changed, 5 insertions, 18 deletions
diff --git a/game.py b/game.py
index b92e895..fb86c10 100644
--- a/game.py
+++ b/game.py
@@ -75,18 +75,7 @@ class MemorizeGame(GObject):
self.flip_block = False
self._flop_cards = None
- # create csound instance to play sound files
- self.sound = 0
- try:
- import csnd
- del csnd
- self.sound = 1
- _logger.error(' [Check for module csnd] found.')
- except:
- _logger.error(' [Check for module csnd] not found. There will be no sound.')
-
- if self.sound == 1:
- self.audio = Audio()
+ self.audio = Audio()
def load_game(self, game_name, size, mode):
self.set_load_mode('Loading game')
@@ -201,12 +190,10 @@ class MemorizeGame(GObject):
self.model.data['running'] = 'True'
- # play sound in case if available
- if self.sound == 1:
- snd = self.model.grid[id].get('snd', None)
- if snd != None:
- sound_file = join(self.model.data.get('pathsnd'), snd)
- self.audio.play(sound_file)
+ snd = self.model.grid[id].get('snd', None)
+ if snd != None:
+ sound_file = join(self.model.data.get('pathsnd'), snd)
+ self.audio.play(sound_file)
self.emit('flip-card', id)
if not signal: