aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authordhewg2011-03-19 15:07:06 +0100
committerdhewg2011-03-19 16:04:55 +0100
commit2cb664178654e4cbe388bd63ae5bdda62b6640ca (patch)
treee7fe82a5a61b3f357bba237ce2dff49a3679464d /engines
parentb5af156839c3fc7704e3f49879b8e8dec8e5ece1 (diff)
downloadscummvm-rg350-2cb664178654e4cbe388bd63ae5bdda62b6640ca.tar.gz
scummvm-rg350-2cb664178654e4cbe388bd63ae5bdda62b6640ca.tar.bz2
scummvm-rg350-2cb664178654e4cbe388bd63ae5bdda62b6640ca.zip
SAGA: Cleanup syncSoundSettings()
And respect global mute settings
Diffstat (limited to 'engines')
-rw-r--r--engines/saga/music.cpp3
-rw-r--r--engines/saga/saga.cpp2
-rw-r--r--engines/saga/sound.cpp8
3 files changed, 11 insertions, 2 deletions
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index dd3034cdb9..f801001d88 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -239,6 +239,9 @@ void Music::setVolume(int volume, int time) {
volume = 255;
if (time == 1) {
+ if (ConfMan.hasKey("mute") && ConfMan.getBool("mute"))
+ volume = 0;
+
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, volume);
_driver->setVolume(volume);
_vm->getTimerManager()->removeTimerProc(&musicVolumeGaugeCallback);
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index 2e34b49dc5..62493f5eac 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -625,6 +625,8 @@ GUI::Debugger *SagaEngine::getDebugger() {
}
void SagaEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
_subtitlesEnabled = ConfMan.getBool("subtitles");
_readingSpeed = getTalkspeed();
diff --git a/engines/saga/sound.cpp b/engines/saga/sound.cpp
index 07e8487ee4..8ffce4e6cd 100644
--- a/engines/saga/sound.cpp
+++ b/engines/saga/sound.cpp
@@ -175,8 +175,12 @@ void Sound::stopAll() {
}
void Sound::setVolume() {
- _vm->_soundVolume = ConfMan.getInt("sfx_volume");
- _vm->_speechVolume = ConfMan.getInt("speech_volume");
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ _vm->_soundVolume = mute ? 0 : ConfMan.getInt("sfx_volume");
+ _vm->_speechVolume = mute ? 0 : ConfMan.getInt("speech_volume");
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, _vm->_soundVolume);
_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, _vm->_speechVolume);
}