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;