Skip to content

Instantly share code, notes, and snippets.

@bgK
Created December 15, 2015 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bgK/bac1e8f3e64a70f9d4d1 to your computer and use it in GitHub Desktop.
Save bgK/bac1e8f3e64a70f9d4d1 to your computer and use it in GitHub Desktop.
diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp
index 0ca3231..b07c016 100644
--- a/backends/mixer/sdl/sdl-mixer.cpp
+++ b/backends/mixer/sdl/sdl-mixer.cpp
@@ -92,6 +92,9 @@ void SdlMixerManager::init() {
debug(1, "SDL mixer sound format: %d differs from desired: %d", _obtained.format, desired.format);
SDL_CloseAudio();
+ fmt.freq = _obtained.freq;
+ fmt.samples = _obtained.samples;
+
if (SDL_OpenAudio(&fmt, NULL) != 0) {
warning("Could not open audio device: %s", SDL_GetError());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment