aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2010-09-11 05:28:54 +0000
committerPaul Gilbert2010-09-11 05:28:54 +0000
commit70fed746df6ab0ff7fe2c80725fb0c94b8ea821a (patch)
tree162db95f88c7f297cbf8cf42391cfbd761ec27f5
parent77c43f4d0dad81d31a502320e0d423e0f50cb17a (diff)
downloadscummvm-rg350-70fed746df6ab0ff7fe2c80725fb0c94b8ea821a.tar.gz
scummvm-rg350-70fed746df6ab0ff7fe2c80725fb0c94b8ea821a.tar.bz2
scummvm-rg350-70fed746df6ab0ff7fe2c80725fb0c94b8ea821a.zip
TINSEL: Fix for #3032780 - Mute not respected in DW1
svn-id: r52674
-rw-r--r--engines/tinsel/music.cpp12
-rw-r--r--engines/tinsel/sound.cpp8
-rw-r--r--engines/tinsel/tinsel.cpp6
3 files changed, 21 insertions, 5 deletions
diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp
index ea34fa963a..9560624e05 100644
--- a/engines/tinsel/music.cpp
+++ b/engines/tinsel/music.cpp
@@ -158,7 +158,11 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) {
if (TinselV1PSX) return false;
if (_vm->_config->_musicVolume != 0) {
- SetMidiVolume(_vm->_config->_musicVolume);
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ SetMidiVolume(mute ? 0 : _vm->_config->_musicVolume);
}
// the index and length of the last tune loaded
@@ -967,8 +971,12 @@ void RestoreMidiFacts(SCNHANDLE Midi, bool Loop) {
currentLoop = Loop;
if (_vm->_config->_musicVolume != 0 && Loop) {
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
PlayMidiSequence(currentMidi, true);
- SetMidiVolume(_vm->_config->_musicVolume);
+ SetMidiVolume(mute ? 0 : _vm->_config->_musicVolume);
}
}
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index d97137d3ef..6e8e736e14 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -129,9 +129,13 @@ bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::Sound
error(FILE_IS_CORRUPT, _vm->getSampleFile(sampleLanguage));
// FIXME: Should set this in a different place ;)
- _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, _vm->_config->_soundVolume);
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, mute ? 0 : _vm->_config->_soundVolume);
//_vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, soundVolumeMusic);
- _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, _vm->_config->_voiceVolume);
+ _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, mute ? 0 : _vm->_config->_voiceVolume);
Audio::AudioStream *sampleStream = 0;
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 248c97e209..702606e84b 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -1169,7 +1169,11 @@ void TinselEngine::RestartDrivers() {
}
// Set midi volume
- SetMidiVolume(_vm->_config->_musicVolume);
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ SetMidiVolume(mute ? 0 : _vm->_config->_musicVolume);
}
/**