aboutsummaryrefslogtreecommitdiff
path: root/backends/mixer/sdl
diff options
context:
space:
mode:
authorMax Horn2010-11-28 14:57:04 +0000
committerMax Horn2010-11-28 14:57:04 +0000
commitf1cdb318c6817e0c63e397f6bdf7524bb02af2d7 (patch)
tree950676b56c4c92802add4cf8c5d7d99aa3e1caed /backends/mixer/sdl
parent7760077cf530c35c969f9286145d9a36d0440d70 (diff)
downloadscummvm-rg350-f1cdb318c6817e0c63e397f6bdf7524bb02af2d7.tar.gz
scummvm-rg350-f1cdb318c6817e0c63e397f6bdf7524bb02af2d7.tar.bz2
scummvm-rg350-f1cdb318c6817e0c63e397f6bdf7524bb02af2d7.zip
SYMBIAN: Fixes & improvements for SymbianSdlMixerManager (untested)
svn-id: r54519
Diffstat (limited to 'backends/mixer/sdl')
-rw-r--r--backends/mixer/sdl/sdl-mixer.cpp6
-rw-r--r--backends/mixer/sdl/sdl-mixer.h2
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