aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorKostas Nakos2008-08-13 15:16:38 +0000
committerKostas Nakos2008-08-13 15:16:38 +0000
commite514760c7a32a10e5b2f9f0022c80266b54632e3 (patch)
tree001b45c67a7dd54ecfec356a8d502cb23be18f51 /backends/platform
parent6ee8022bac3d14fae9b9d0548e2a638534c6d0ac (diff)
downloadscummvm-rg350-e514760c7a32a10e5b2f9f0022c80266b54632e3.tar.gz
scummvm-rg350-e514760c7a32a10e5b2f9f0022c80266b54632e3.tar.bz2
scummvm-rg350-e514760c7a32a10e5b2f9f0022c80266b54632e3.zip
fix bug #2038992 by saving and restoring channel volumes
svn-id: r33829
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/wince/wince-sdl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 3f16b4fdd1..8334d70ac8 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -805,8 +805,16 @@ void OSystem_WINCE3::setupMixer() {
debug(1, "Sound opened OK, mixing at %d Hz", _sampleRate);
// Re-create mixer to match the output rate
+ int vol1 = _mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType);
+ int vol2 = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType);
+ int vol3 = _mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType);
+ int vol4 = _mixer->getVolumeForSoundType(Audio::Mixer::kSpeechSoundType);
delete(_mixer);
_mixer = new Audio::MixerImpl(this);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, vol1);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, vol2);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, vol3);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, vol4);
_mixer->setOutputRate(_sampleRate);
_mixer->setReady(true);
SDL_PauseAudio(0);