[SDL] SDL_mixer is recognizing MP3 as MOD

Nikos Chantziaras realnc at arcor.de
Fri Jul 15 22:00:06 PDT 2011


On 07/16/2011 03:23 AM, Ryan C. Gordon wrote:
>
>> http://foss.aegean.gr/~realnc/file.mp3
>>
>> 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.

Thanks, Ryan, but unfortunately, I'm using Mix_LoadMUS_RW().  There are 
no individual MP3 files; everything is in a big, uncompressed, single file.




More information about the SDL mailing list