[Scummvm-cvs-logs] SF.net SVN: scummvm:[51105] scummvm/trunk/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Wed Jul 21 22:26:41 CEST 2010
Revision: 51105
http://scummvm.svn.sourceforge.net/scummvm/?rev=51105&view=rev
Author: lordhoto
Date: 2010-07-21 20:26:40 +0000 (Wed, 21 Jul 2010)
Log Message:
-----------
KYRA: Fix mute setting with MIDI and FM-Towns/PC98 output.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/sound_midi.cpp
scummvm/trunk/engines/kyra/sound_towns.cpp
Modified: scummvm/trunk/engines/kyra/sound_midi.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_midi.cpp 2010-07-21 20:22:24 UTC (rev 51104)
+++ scummvm/trunk/engines/kyra/sound_midi.cpp 2010-07-21 20:26:40 UTC (rev 51105)
@@ -573,9 +573,13 @@
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;
Modified: scummvm/trunk/engines/kyra/sound_towns.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_towns.cpp 2010-07-21 20:22:24 UTC (rev 51104)
+++ scummvm/trunk/engines/kyra/sound_towns.cpp 2010-07-21 20:26:40 UTC (rev 51105)
@@ -4254,8 +4254,12 @@
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 @@
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 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
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list