I’m trying to get MP3s playing on Mac OS X using SDL_mixer + SMPEG.
When I load the MP3 file I get the message “Warning: incorrect audio
format,” and then the audio sounds really bad. This appears to be some
kind of endian issue. I first tried re?ncoding the MP3 with a
sample-rate matching the parameter I gave when initializing SDL_mixer.
The sound was improved, but it’s still horribly messed-up.
Here’s how I built SMPEG and SDL_mixer with XCode:
I converted both the SDL_mixer and SMPEG PB projects to XCode using the
"Upgrade All Targets to Native" command and added the appropriate
Header Search Paths. I then built and installed the SMPEG framework.
Before building SDL_mixer I got rid of the smpeg.framework that was
lurking in SDL_mixer’s “pkg-support” folder. I also added -DMP3_MUSIC
to the “Other C Flags” in SDL_mixer’s target settings for MP3 support.
Both builds went without a hitch.
Now I’m stuck. Is there anything else I can do to the SMPEG or
SDL_mixer code to get MP3s working correctly? Is this in fact an endian
issue, or just a limitation of the SMPEG MP3 decoder?–
Portland OR / Seattle WA
Scott Lahteine <@Scott_Lahteine>
“No universe is perfect which leaves no room for improvement.”