[SDL] SDL_Mixer playing WAV files

Pete Shinners pete at shinners.org
Tue Aug 1 17:01:29 PDT 2006


David Roguin <nesdavid <at> 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)








More information about the SDL mailing list