[SDL] SDL_mixer is recognizing MP3 as MOD
realnc at arcor.de
Fri Jul 15 22:46:23 PDT 2011
On 07/16/2011 08:17 AM, Mason Wheeler wrote:
> *From:* Nikos Chantziaras <realnc at arcor.de>
> ***Subject:* Re: [SDL] SDL_mixer is recognizing MP3 as MOD
> Thanks, Ryan, but unfortunately, I'm using Mix_LoadMUS_RW(). There are
> no individual MP3 files; everything is in a big, uncompressed, single file.
> Then you're in a bind. The load music function needs to have some way of
> telling what type of music to load. If it's loading from a file it can
> infer a type from the filename. If not, it has to figure it out from the
> magic numbers in the file header. Your MP3 player can play it with a
> corrupt header because it already knows that it's dealing with am MP3.
> But SDL_Mixer doesn't know that. You need some way for it to recognize
> what you have as an MP3. What would you propose?
An argument to Mix_LoadMUS_RW() for the type. But this breaks the API,
of course. So if there's not going to be an SDL_mixer 2.0 any time
soon, a new Mix_LoadMUS_Type_RW() might do it.
More information about the SDL