aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-07-21 20:26:40 +0000
committerJohannes Schickel2010-07-21 20:26:40 +0000
commit44aab95eb9c2b8e8777a50d80d4edbf462762d47 (patch)
tree976659f936fc5967143a31675fb6ddb7665c3434
parent0d1c44301ab51ad375e88479b3f965cfccc53a45 (diff)
downloadscummvm-rg350-44aab95eb9c2b8e8777a50d80d4edbf462762d47.tar.gz
scummvm-rg350-44aab95eb9c2b8e8777a50d80d4edbf462762d47.tar.bz2
scummvm-rg350-44aab95eb9c2b8e8777a50d80d4edbf462762d47.zip
KYRA: Fix mute setting with MIDI and FM-Towns/PC98 output.
svn-id: r51105
-rw-r--r--engines/kyra/sound_midi.cpp8
-rw-r--r--engines/kyra/sound_towns.cpp30
2 files changed, 25 insertions, 13 deletions
diff --git a/engines/kyra/sound_midi.cpp b/engines/kyra/sound_midi.cpp
index 7eb151a64d..026c72de26 100644
--- a/engines/kyra/sound_midi.cpp
+++ b/engines/kyra/sound_midi.cpp
@@ -573,8 +573,12 @@ void SoundMidiPC::updateVolumeSettings() {
if (!_output)
return;
- int newMusVol = ConfMan.getInt("music_volume");
- _sfxVolume = ConfMan.getInt("sfx_volume");
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ const int newMusVol = (mute ? 0 : ConfMan.getInt("music_volume"));
+ _sfxVolume = (mute ? 0 : ConfMan.getInt("sfx_volume"));
_output->setSourceVolume(0, newMusVol, newMusVol != _musicVolume);
_musicVolume = newMusVol;
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 5953e6cd18..9b17011ecf 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -4254,8 +4254,12 @@ void SoundPC98::updateVolumeSettings() {
if (!_driver)
return;
- _driver->setMusicVolume(ConfMan.getInt("music_volume"));
- _driver->setSoundEffectVolume(ConfMan.getInt("sfx_volume"));
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ _driver->setMusicVolume((mute ? 0 : ConfMan.getInt("music_volume")));
+ _driver->setSoundEffectVolume((mute ? 0 : ConfMan.getInt("sfx_volume")));
}
// KYRA 2
@@ -4456,14 +4460,18 @@ void SoundTownsPC98_v2::updateVolumeSettings() {
if (!_driver)
return;
- _driver->setMusicVolume(ConfMan.getInt("music_volume"));
- _driver->setSoundEffectVolume(ConfMan.getInt("sfx_volume"));
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ _driver->setMusicVolume((mute ? 0 : ConfMan.getInt("music_volume")));
+ _driver->setSoundEffectVolume((mute ? 0 : ConfMan.getInt("sfx_volume")));
}
// static resources
const uint32 TownsPC98_OpnCore::_adtStat[] = {
- 0x00010001, 0x00010001, 0x00010001, 0x01010001,
+ 0x00010001, 0x00010001, 0x00010001, 0x01010001,
0x00010101, 0x00010101, 0x00010101, 0x01010101,
0x01010101, 0x01010101, 0x01010102, 0x01010102,
0x01020102, 0x01020102, 0x01020202, 0x01020202,
@@ -4477,14 +4485,14 @@ const uint32 TownsPC98_OpnCore::_adtStat[] = {
const uint8 TownsPC98_OpnCore::_detSrc[] = {
0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03,
0x04, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07,
- 0x08, 0x08, 0x08, 0x08, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03,
+ 0x08, 0x08, 0x08, 0x08, 0x01, 0x01, 0x01, 0x01,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03,
0x04, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07,
- 0x08, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
- 0x10, 0x10, 0x10, 0x10, 0x02, 0x02, 0x02, 0x02,
+ 0x08, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
+ 0x10, 0x10, 0x10, 0x10, 0x02, 0x02, 0x02, 0x02,
0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05,
- 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09, 0x0a,
- 0x0b, 0x0c, 0x0d, 0x0e, 0x10, 0x11, 0x13, 0x14,
+ 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09, 0x0a,
+ 0x0b, 0x0c, 0x0d, 0x0e, 0x10, 0x11, 0x13, 0x14,
0x16, 0x16, 0x16, 0x16
};