aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise/sound.cpp
diff options
context:
space:
mode:
authordhewg2011-03-19 14:53:43 +0100
committerdhewg2011-03-19 16:04:50 +0100
commit562e502d7888e9b3a0a64725c9420c9e6484b5a9 (patch)
tree3ac5444d0b8db06addb36b31d054b55e2da742b1 /engines/cruise/sound.cpp
parente5056cab91843ec0de9b2c9d1b6d91ed49189da9 (diff)
downloadscummvm-rg350-562e502d7888e9b3a0a64725c9420c9e6484b5a9.tar.gz
scummvm-rg350-562e502d7888e9b3a0a64725c9420c9e6484b5a9.tar.bz2
scummvm-rg350-562e502d7888e9b3a0a64725c9420c9e6484b5a9.zip
CRUISE: Cleanup syncSoundSettings()
And init volume levels on startup
Diffstat (limited to 'engines/cruise/sound.cpp')
-rw-r--r--engines/cruise/sound.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp
index 8a4b1d0d2b..2826a34351 100644
--- a/engines/cruise/sound.cpp
+++ b/engines/cruise/sound.cpp
@@ -283,9 +283,21 @@ void PCSoundDriver::resetChannel(int channel) {
}
void PCSoundDriver::syncSounds() {
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ bool music_mute = mute;
+ bool sfx_mute = mute;
+
+ if (!mute) {
+ music_mute = ConfMan.getBool("music_mute");
+ sfx_mute = ConfMan.getBool("sfx_mute");
+ }
+
// Get the new music and sfx volumes
- _musicVolume = ConfMan.getBool("music_mute") ? 0 : MIN(255, ConfMan.getInt("music_volume"));
- _sfxVolume = ConfMan.getBool("sfx_mute") ? 0 : MIN(255, ConfMan.getInt("sfx_volume"));
+ _musicVolume = music_mute ? 0 : MIN(255, ConfMan.getInt("music_volume"));
+ _sfxVolume = sfx_mute ? 0 : MIN(255, ConfMan.getInt("sfx_volume"));
}
AdLibSoundDriver::AdLibSoundDriver(Audio::Mixer *mixer)