I wrote a library to read unsigned 8 bit pcm audio from a old game and I stuffed the raw data into a Mix_Chunk using this code:
Mix_Chunk sfx;
sfx.allocated = 1;
sfx.abuf = (Uint8*)data;
sfx.alen = length;
sfx.volume = 32;
I know the samplerate is 10989HZ but when I set the sample rate using Mix_OpenAudio(10989, AUDIO_U8, 2, 2048
it plays the sound way too fast, am I setting the sample rate wrong or is it just SDL2 not liking PCM?
if I dump it into a file and open it with Audacity it plays just fine