Mp3 file plays two times faster on Mac

Hi,

I’m using SDL2_mixer on Mac (Yosemite 10.10.2). I have an mp3 file that plays fine with other programs, but when I run my SDL2 program, it plays too fast.

What settings can I change to make it work properly?------------------------
bigosaur.com

The file is 44100 kHz. I first tried changing Mix_OpenAudio setting to 22050 but that did not work. I then recoded they mp3 file to 22050 and returned Mix_OpenAudio setting to 44100 and now it plays properly, but this is really strange (and I lost some quality because of mp3->wav->mp3 conversion).

Any clues?------------------------
bigosaur.com

Can you send me the original MP3?

–ryan.On 3/21/15 10:13 AM, mbabuskov wrote:

The file is 44100 kHz. I first tried changing Mix_OpenAudio setting to
22050 but that did not work. I then recoded they mp3 file to 22050 and
returned Mix_OpenAudio setting to 44100 and now it plays properly, but
this is really strange (and I lost some quality because of mp3->wav->mp3
conversion).

Any clues?

Ryan C. Gordon wrote:

Can you send me the original MP3?

I forgot to include that, sorry. You can download it from here:

Thanks.------------------------
bigosaur.com

After some playing, I discovered that 22050 files only play well because I actually slowed them down with lame, not because of the setting. In other programs it plays 2x slower.

There are no issues with .OGG, so this seems to be something about MP3 playback only.------------------------
bigosaur.com