From d12278b4cce4f8a7cc76bf8868363c6397245322 Mon Sep 17 00:00:00 2001 From: dhewg Date: Sat, 19 Mar 2011 14:55:14 +0100 Subject: DRACI: Respect global mute settings --- engines/draci/sound.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'engines/draci') 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); } -- cgit v1.2.3