From 78cdb01ef177d27d0419bf12d840f0991529c2dd Mon Sep 17 00:00:00 2001 From: andreja6 Date: Thu, 26 Apr 2018 21:28:22 -0700 Subject: [PATCH] changed how bitrate is set --- AudioPlayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AudioPlayer.cpp b/AudioPlayer.cpp index b111763..c7dc53f 100644 --- a/AudioPlayer.cpp +++ b/AudioPlayer.cpp @@ -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;