[SDL] Mac OS X : SDL_Mixer Playing MIDI and MP3 files at the incorrect speed

dominique at savagesoftwaresolutions.com dominique at savagesoftwaresolutions.com
Sun Jul 11 16:24:29 PDT 2010


Hi All,
  I'm using SDL_Mixer to play MIDI and mp3 files on Mac OS X. Users of my
application are reporting...
"32000 Hz WAV are played at half of actual speed, 8000 Hz WAV are played
at double actual speed and a 12000 Hz MP3 is not played at all."


I'm initialising Mixer as follows...
Mix_OpenAudio( MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT,
MIX_DEFAULT_CHANNELS, 1024 );
And am using smpeg for mp3 support.

Thinking it would be ok, but obviously it isn't ideal.

Is there a better way for me to handle the different types of audio file
formats correctly, so that they all play at the correct speed?

How are others handling the possibility of users throwing all manner of
sound formats at their application?


Thanks,



Dominique.






More information about the SDL mailing list