SDL_Mixer playing WAV files

Hi list,

I’m using SDL_Mixer 1.2.7 and I’m wondering why the wav files sound so
different when played in the Winamp than played with SDL_Mixer?

Is that a known feature (bug)?

Regards

David Roguin wrote:

Hi list,

I’m using SDL_Mixer 1.2.7 and I’m wondering why the wav files sound so
different when played in the Winamp than played with SDL_Mixer?

Describe “sound so different” ?

Pete.

David Roguin <nesdavid gmail.com> writes:

I’m using SDL_Mixer 1.2.7 and I’m wondering why the wav files sound so
different when played in the Winamp than played with SDL_Mixer?

Is that a known feature (bug)?

SDL can only resample audio by halves or doubles of the loaded rate.
So if you load a wav file at 41khz but playback at 22khz or 44khz it will not be
the right speed, which makes the pitch sound different.

You’ll want to get all your sound samples into the same rate for your game, and
then initialize the SDL audio to that sample rate (or a multiple of that rate)