The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
mp3 file plays two times faster on Mac
mbabuskov


Joined: 08 Feb 2015
Posts: 29
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?
mbabuskov


Joined: 08 Feb 2015
Posts: 29
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?
mp3 file plays two times faster on Mac
Ryan C. Gordon
Guest

On 3/21/15 10:13 AM, mbabuskov wrote:
Quote:
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?

Can you send me the original MP3?

--ryan.


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: mp3 file plays two times faster on Mac
mbabuskov


Joined: 08 Feb 2015
Posts: 29
Ryan C. Gordon wrote:
Can you send me the original MP3?


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

http://bigosaur.com/intro-orig.mp3

Thanks.
mbabuskov


Joined: 08 Feb 2015
Posts: 29
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.