diff options
Diffstat (limited to 'backends/mixer/sdl')
| -rw-r--r-- | backends/mixer/sdl/sdl-mixer.cpp | 6 | ||||
| -rw-r--r-- | backends/mixer/sdl/sdl-mixer.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp index 3c826bfed8..fa2bf3e232 100644 --- a/backends/mixer/sdl/sdl-mixer.cpp +++ b/backends/mixer/sdl/sdl-mixer.cpp @@ -58,7 +58,7 @@ void SdlMixerManager::init() { } // Get the desired audio specs - SDL_AudioSpec desired = getAudioSpec(); + SDL_AudioSpec desired = getAudioSpec(SAMPLES_PER_SEC); // Start SDL audio with the desired specs if (SDL_OpenAudio(&desired, &_obtainedRate) != 0) { @@ -78,7 +78,7 @@ void SdlMixerManager::init() { } } -SDL_AudioSpec SdlMixerManager::getAudioSpec() { +SDL_AudioSpec SdlMixerManager::getAudioSpec(uint32 outputRate) { SDL_AudioSpec desired; // Determine the desired output sampling frequency. @@ -86,7 +86,7 @@ SDL_AudioSpec SdlMixerManager::getAudioSpec() { if (ConfMan.hasKey("output_rate")) samplesPerSec = ConfMan.getInt("output_rate"); if (samplesPerSec <= 0) - samplesPerSec = SAMPLES_PER_SEC; + samplesPerSec = outputRate; // Determine the sample buffer size. We want it to store enough data for // at least 1/16th of a second (though at most 8192 samples). Note diff --git a/backends/mixer/sdl/sdl-mixer.h b/backends/mixer/sdl/sdl-mixer.h index 1b3a3543dc..ca0cbbf93f 100644 --- a/backends/mixer/sdl/sdl-mixer.h +++ b/backends/mixer/sdl/sdl-mixer.h @@ -83,7 +83,7 @@ protected: /** * Returns the desired audio specification */ - virtual SDL_AudioSpec getAudioSpec(); + virtual SDL_AudioSpec getAudioSpec(uint32 rate); /** * Starts SDL audio |
