SDL_Mixer distorted music

Hi
I downloaded the code for sdl_mixer and built the library with mp3 support.
I am able to play mp3 music file.
It works fine if i use frequency 11025. It takes 2min and 48 sec to play the
file.
But if i set frquency 22050 i get distorted music. It takes the same time 2 min
and 48 sec, and if i set 44100 i get distorted music and it runs faster.It
takes 1 min and 24 sec to play the music.
The mp3 file is created at 22050Hz and channel type is mono.
What could be the reason of this behaviour?
Is this a bug of sdl_mixer or something wrong with build process?
I am using a sdl_mixer demo file sdlwav.c.
You can find it at http://jcatki.no-ip.org/SDL_mixer/demos/
Thanks
Hemu

Hemu wrote:

Hi
I downloaded the code for sdl_mixer and built the library with mp3 support.
I am able to play mp3 music file.
It works fine if i use frequency 11025. It takes 2min and 48 sec to play the
file.
But if i set frquency 22050 i get distorted music. It takes the same time 2 min
and 48 sec, and if i set 44100 i get distorted music and it runs faster.It
takes 1 min and 24 sec to play the music.
The mp3 file is created at 22050Hz and channel type is mono.
What could be the reason of this behaviour?
Is this a bug of sdl_mixer or something wrong with build process?
I am using a sdl_mixer demo file sdlwav.c.
You can find it at http://jcatki.no-ip.org/SDL_mixer/demos/
Thanks
Hemu

I’ve noticed this too, it seems the frequency of the mp3 being played is not converted to the output frequency
I’m not sure whther mono is doubled to stereo either, so that may cause even more problems.
I’ll see if I can find the problem in SDL_mixer and submit a patch.
in the mean time, you may have more luck using SDL_sound from http://icculus.org/SDL_sound/
however it is not a sound mixer so it may take more work to use, unless you want to play just one sound at a time :slight_smile:

-LIM-