aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2010-09-11 04:32:53 +0000
committerPaul Gilbert2010-09-11 04:32:53 +0000
commit77c43f4d0dad81d31a502320e0d423e0f50cb17a (patch)
tree306f58ae7ad0121d4e6e50e4401626a56bad2332
parenta002c6f2fd8041876f646784b79255295edef0ef (diff)
downloadscummvm-rg350-77c43f4d0dad81d31a502320e0d423e0f50cb17a.tar.gz
scummvm-rg350-77c43f4d0dad81d31a502320e0d423e0f50cb17a.tar.bz2
scummvm-rg350-77c43f4d0dad81d31a502320e0d423e0f50cb17a.zip
TINSEL: Fix for #3032778 - Mute not respected in DW2
svn-id: r52673
-rw-r--r--engines/tinsel/sound.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index ce2ed51d09..d97137d3ef 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -34,6 +34,7 @@
#include "tinsel/sysvar.h"
#include "tinsel/background.h"
+#include "common/config-manager.h"
#include "common/endian.h"
#include "common/file.h"
#include "common/system.h"
@@ -318,9 +319,13 @@ bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int p
}
// FIXME: Should set this in a different place ;)
- _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, _vm->_config->_soundVolume);
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, mute ? 0 : _vm->_config->_soundVolume);
//_vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, soundVolumeMusic);
- _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, _vm->_config->_voiceVolume);
+ _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, mute ? 0 : _vm->_config->_voiceVolume);
curChan->sampleNum = id;
curChan->subSample = sub;