changed how bitrate is set

This commit is contained in:
andreja6
2018-04-26 21:28:22 -07:00
parent 1ed434c858
commit 78cdb01ef1

View File

@@ -79,7 +79,7 @@ void AudioPlayer::PlaySound(std::string fileString)
return;
}
SDL_BuildAudioCVT(&cvt, wave.format, wave.channels, wave.freq,
AUDIO_S16, 2, 22050);
AUDIO_S16, 2, fmt.freq);
cvt.buf = (Uint8*)malloc(dlen*cvt.len_mult);
memcpy(cvt.buf, data, dlen);
cvt.len = dlen;