diff options
author | Jamieson Christian | 2003-09-25 22:32:05 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-09-25 22:32:05 +0000 |
commit | a30eb131bb746efc3134e34db8870c5889deeb1a (patch) | |
tree | 850d43a482cd9d32c99371248a626bd5f06a77c3 /scumm | |
parent | f5d8300043fb36b72313707948d803e5e9674bf7 (diff) | |
download | scummvm-rg350-a30eb131bb746efc3134e34db8870c5889deeb1a.tar.gz scummvm-rg350-a30eb131bb746efc3134e34db8870c5889deeb1a.tar.bz2 scummvm-rg350-a30eb131bb746efc3134e34db8870c5889deeb1a.zip |
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.
svn-id: r10409
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/imuse_player.cpp | 2 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/scumm/imuse_player.cpp b/scumm/imuse_player.cpp index 784b92bb0e..d3bb913f0f 100644 --- a/scumm/imuse_player.cpp +++ b/scumm/imuse_player.cpp @@ -374,6 +374,7 @@ void Player::sysEx(byte *p, uint16 len) { // 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 @@ void Player::sysEx(byte *p, uint16 len) { 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) { diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index dda7c58246..17786a9351 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -738,7 +738,10 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst) } 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); |