[SDL] problems loading ogg and wav music.

James Barrett xucaen at gmail.com
Sat Dec 22 20:49:33 PST 2007


Hi, I am trying to open an ogg file with Mix_FadeInMusic().  I could not
find an entry at http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fmixer for
this function, so I looked in the SDL_mixer.h file. I see  Mix_MusicType
enum with a MUS_OGG type so I assume that SDL_mixer does support ogg
music files. But the program crashes as soon as the call to
Mix_FadeInMusic() is made, and nothing after it. It never even gets to
the next line that prints the Mix_GetError() to stderr. So I'm not sure
what I did wrong. No error is produced when I load the file with
Mix_LoadMUS() so I assume it is reading the file ok.

Then another problem occured. I exported the  ogg file (with audacity)
as a wav file, and now Mix_LoadMUS() can't load the file. Output from
Mix_GetError() is "Unable to load WAV file".

I am running Debian Linux (Etch) with stable deb packages fro SDL and
SDL_mixer.
SDL 1.2.11-8
SDL_mixer 1.2.6-1.1+b2

I am able to load and play ogg sound effects with Mix_LoadWAV and
Mix_PlayChannel()


Jim





More information about the SDL mailing list