[Scummvm-cvs-logs] CVS: scummvm/scumm imuse_player.cpp,2.31,2.32 scummvm.cpp,2.403,2.404
Jamieson Christian
jamieson630 at users.sourceforge.net
Thu Sep 25 15:33:03 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv11551/scumm
Modified Files:
imuse_player.cpp scummvm.cpp
Log Message:
Fix for Bug [810564] ALL: missing instruments with native MT-32
As defined in Patch [811623] MT-32 patch for Bug 810564
Added a channel mask to MPU-401 devices so that --native-mt32
may force the device to use only the subset of MIDI channels
actually supported by the MT-32. Also added a best-guess
interpretation of iMuse Part priority in the SysEx 0x00 msg,
since part priorities become more of an issue when the
channel count is cramped.
Index: imuse_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_player.cpp,v
retrieving revision 2.31
retrieving revision 2.32
diff -u -d -r2.31 -r2.32
--- imuse_player.cpp 18 Sep 2003 02:07:17 -0000 2.31
+++ imuse_player.cpp 25 Sep 2003 22:32:04 -0000 2.32
@@ -374,6 +374,7 @@
// as follows:
// BYTE 00: Channel #
// BYTE 02: BIT 01(0x01): Part on?(1 = yes)
+ // BYTE 04: Priority adjustment [guessing]
// BYTE 05: Volume(upper 4 bits) [guessing]
// BYTE 06: Volume(lower 4 bits) [guessing]
// BYTE 09: BIT 04(0x08): Percussion?(1 = yes)
@@ -382,6 +383,7 @@
part = getPart(p[0] & 0x0F);
if (part) {
part->set_onoff(p[2] & 0x01);
+ part->set_pri (p[4]);
part->setVolume((p[5] & 0x0F) << 4 |(p[6] & 0x0F));
part->_percussion = _isGM ?((p[9] & 0x08) > 0) : false;
if (part->_percussion) {
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.403
retrieving revision 2.404
diff -u -d -r2.403 -r2.404
--- scummvm.cpp 25 Sep 2003 06:12:04 -0000 2.403
+++ scummvm.cpp 25 Sep 2003 22:32:04 -0000 2.404
@@ -738,7 +738,10 @@
} else if (((_midiDriver == MD_PCJR) || (_midiDriver == MD_PCSPK)) && ((_version > 2) && (_version < 5))) {
_musicEngine = _playerV2 = new Player_V2(this);
} else if (_version > 2) {
- _musicEngine = _imuse = IMuse::create(syst, _mixer, detector->createMidi());
+ MidiDriver *driver = detector->createMidi();
+ if (driver && detector->_native_mt32)
+ driver->property (MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
+ _musicEngine = _imuse = IMuse::create(syst, _mixer, driver);
if (_imuse) {
if (detector->_gameTempo != 0)
_imuse->property(IMuse::PROP_TEMPO_BASE, detector->_gameTempo);
More information about the Scummvm-git-logs
mailing list