[SDL] problems loading ogg and wav music.
xucaen at gmail.com
Sun Dec 23 16:35:27 PST 2007
Solra Bizna wrote:
> On 12/23/07, James Barrett <xucaen at gmail.com> wrote:
>> Then, when attempting to load a wav music file with the above two lines
>> of code, Mix_GetError() returns "Module format not recognized"
> Mix_LoadMUS_RW can only load music in either Ogg format or a
> MikMod-compatible format. The other helper libraries it uses are only
> capable of loading from a given filename, apparently.
> At a guess, it tries loading it as an Ogg, and if that fails passes it
> to MikMod to try as a Module (returning the error MikMod gave it on
Loading an ogg file the regular way with Mix_LoadMUS(), and trying to
play either with Mix_FadeInMusic() or Mix_PlayMusic() causes my program
to crash. It never return from Mix_FadeInMusic() or Mix_PlayMusic(). I
don't know what MikMod is, but I would assume based on the comments I
read in SDL_mixer.h that these functions would open and play any
supported file format. I only tried it the other way when all else
failed. Are you able to get ogg music files to play using either
Mix_FadeInMusic() or Mix_PlayMusic()?
More information about the SDL