From 44aab95eb9c2b8e8777a50d80d4edbf462762d47 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 21 Jul 2010 20:26:40 +0000 Subject: KYRA: Fix mute setting with MIDI and FM-Towns/PC98 output. svn-id: r51105 --- engines/kyra/sound_towns.cpp | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'engines/kyra/sound_towns.cpp') 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 }; -- cgit v1.2.3