[SDL] SDL_mixer is recognizing MP3 as MOD
Ryan C. Gordon
icculus at icculus.org
Fri Jul 15 17:23:26 PDT 2011
> From what I can tell at looking in the file, it was encoded with LAME.
It is, strictly speaking, a corrupt MP3. It's got a bunch of NULL bytes
at the front.
That being said, there are a lot of corrupt MP3 files that will play
without obvious problems if you let the player skip ahead until it finds
valid frames, so here's a patch for Mix_LoadMUS() that will ignore the
magic in mp3 files. Please note that this won't work for
Mix_LoadMUS_RW(), as that doesn't take a filename. Basically this patch
says: if you say it's an ".mp3", we'll believe you.
I don't have SMPEG or libmad installed here, so you'll have to tell me
if this works for you before I can commit it. Attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1476 bytes
Desc: not available
More information about the SDL