diff options
author | Eugene Sandulenko | 2010-09-20 20:37:34 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-09-20 20:37:34 +0000 |
commit | ba04f31adec555fabf9b7675c4b3bf207cda8ba5 (patch) | |
tree | 2ec6e4f55bd9911116dde64e9fc4ba311e1a0ec8 /engines/sword1 | |
parent | 610686818811f6e4e39589a9631301fa04054f23 (diff) | |
download | scummvm-rg350-ba04f31adec555fabf9b7675c4b3bf207cda8ba5.tar.gz scummvm-rg350-ba04f31adec555fabf9b7675c4b3bf207cda8ba5.tar.bz2 scummvm-rg350-ba04f31adec555fabf9b7675c4b3bf207cda8ba5.zip |
SWORD1: Fix bug #3032772: SWORD1: Mute setting does not work
svn-id: r52827
Diffstat (limited to 'engines/sword1')
-rw-r--r-- | engines/sword1/sword1.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 26bb1d959b..0d4f5b7445 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -214,12 +214,20 @@ void SwordEngine::syncSoundSettings() { sfxVolL = 255; } - _music->setVolume(musicVolL, musicVolR); - _sound->setSpeechVol(speechVolL, speechVolR); - _sound->setSfxVol(sfxVolL, sfxVolR); + bool mute = ConfMan.getBool("mute"); - _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); - _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); + if (mute) { + _music->setVolume(0, 0); + _sound->setSpeechVol(0, 0); + _sound->setSfxVol(0, 0); + } else { + _music->setVolume(musicVolL, musicVolR); + _sound->setSpeechVol(speechVolL, speechVolR); + _sound->setSfxVol(sfxVolL, sfxVolR); + } + + _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, mute ? 0 : ConfMan.getInt("sfx_volume")); + _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, mute ? 0 : ConfMan.getInt("speech_volume")); } void SwordEngine::flagsToBool(bool *dest, uint8 flags) { |