Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

ogg file cannot be played on mac #1

Closed
orsenthil opened this issue Jan 18, 2016 · 6 comments
Closed

ogg file cannot be played on mac #1

orsenthil opened this issue Jan 18, 2016 · 6 comments
Labels

Comments

@orsenthil
Copy link

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
@orsenthil
Copy link
Author

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

@tasdikrahman
Copy link
Owner

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 😄

@triple-h3lix
Copy link
Contributor

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.

@tasdikrahman
Copy link
Owner

@orsenthil Does doing the following fix the issue?

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

@orsenthil
Copy link
Author

@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).

@tasdikrahman
Copy link
Owner

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

tasdikrahman added a commit that referenced this issue Jan 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants