aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authordhewg2011-03-19 14:55:14 +0100
committerdhewg2011-03-19 16:04:51 +0100
commitd12278b4cce4f8a7cc76bf8868363c6397245322 (patch)
treedc7f1fa687b373228c033df9761e33e67d3fa1ff /engines
parente43d54fa96fd354416c5e17e92dcb585c8779f4f (diff)
downloadscummvm-rg350-d12278b4cce4f8a7cc76bf8868363c6397245322.tar.gz
scummvm-rg350-d12278b4cce4f8a7cc76bf8868363c6397245322.tar.bz2
scummvm-rg350-d12278b4cce4f8a7cc76bf8868363c6397245322.zip
DRACI: Respect global mute settings
Diffstat (limited to 'engines')
-rw-r--r--engines/draci/sound.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/draci/sound.cpp b/engines/draci/sound.cpp
index dc8f548d6b..c8646fff67 100644
--- a/engines/draci/sound.cpp
+++ b/engines/draci/sound.cpp
@@ -408,6 +408,9 @@ void Sound::stopVoice() {
}
void Sound::setVolume() {
+ _showSubtitles = ConfMan.getBool("subtitles");
+ _talkSpeed = ConfMan.getInt("talkspeed");
+
if (_mixer->isReady()) {
_muteSound = ConfMan.getBool("sfx_mute");
_muteVoice = ConfMan.getBool("speech_mute");
@@ -417,10 +420,10 @@ void Sound::setVolume() {
if (ConfMan.getBool("mute")) {
_muteSound = _muteVoice = true;
}
- _showSubtitles = ConfMan.getBool("subtitles");
- _talkSpeed = ConfMan.getInt("talkspeed");
- const int soundVolume = ConfMan.getInt("sfx_volume");
- const int speechVolume = ConfMan.getInt("speech_volume");
+
+ const int soundVolume = _muteSound ? 0: ConfMan.getInt("sfx_volume");
+ const int speechVolume = _muteVoice ? 0 : ConfMan.getInt("speech_volume");
+
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, soundVolume);
_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, speechVolume);
}