tasdikrahman/spaceShooter

ogg file cannot be played on mac

orsenthil opened this issue · 6 comments

15:20 $ python spaceShooter.py
Traceback (most recent call last):
  File "spaceShooter.py", line 343, in <module>
    pygame.mixer.music.load(path.join(sound_folder, 'tgfcoder-FrozenJam-SeamlessLoop.ogg'))
pygame.error: Unrecognized music format

I was able to play the game by converting the ogg files to wav. Suggest shiping .wav instead of .ogg

@@ -340,10 +340,10 @@ expl_sounds = []
 for sound in ['expl3.wav', 'expl6.wav']:
     expl_sounds.append(pygame.mixer.Sound(path.join(sound_folder, sound)))
 ## main background music
-pygame.mixer.music.load(path.join(sound_folder, 'tgfcoder-FrozenJam-SeamlessLoop.ogg'))
+pygame.mixer.music.load(path.join(sound_folder, 'tgfcoder-FrozenJam-SeamlessLoop.wav'))
 pygame.mixer.music.set_volume(0.2)

-player_die_sound = pygame.mixer.Sound(path.join(sound_folder, 'rumble1.ogg'))
+player_die_sound = pygame.mixer.Sound(path.join(sound_folder, 'rumble1.wav'))
 ###################################################

 ## group all the sprites together for ease of update

Hey @orsenthil

I don't have a MAC so couldn't test on it.
Will try to fix #1 and #2 in the next release.

Thanks for your time 😄

I'm not too familiar with mac, either. My first thought was to throw the .dll files for playing .ogg files into the game /dir.

@orsenthil Does doing the following fix the issue?

$ brew install libogg
$ brew install libvorbis
$ brew install sdl_mixer --with-libvorbis

@prodicus , that solves the problem with ogg files on mac. Thanks. (.wav is supported out of box all platforms, but not sure if it's worth converting ogg to wav).

@orsenthil 👍 So there are no issues apart from this in OS X that you encountered?