diff options
author | Jamieson Christian | 2003-05-16 19:16:43 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-05-16 19:16:43 +0000 |
commit | 0ece527a694439666fa039dcc7995b97ce84ad65 (patch) | |
tree | bf7828ca3fddf50d5a459aa66974b728e0a8f85f | |
parent | 52832cc954d16e11db37af4053b2cc04ca25adfc (diff) | |
download | scummvm-rg350-0ece527a694439666fa039dcc7995b97ce84ad65.tar.gz scummvm-rg350-0ece527a694439666fa039dcc7995b97ce84ad65.tar.bz2 scummvm-rg350-0ece527a694439666fa039dcc7995b97ce84ad65.zip |
FINALLY got MI2 Woodtick music working!
svn-id: r7577
-rw-r--r-- | scumm/imuse.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp index c5bc46e91e..d5effa8f89 100644 --- a/scumm/imuse.cpp +++ b/scumm/imuse.cpp @@ -2042,6 +2042,8 @@ void Player::parse_sysex(byte *p, uint len) { // BYTE 05: Volume (upper 4 bits) [guessing] // BYTE 06: Volume (lower 4 bits) [guessing] // BYTE 09: BIT 04 (0x08): Percussion? (1 = yes) + // BYTE 15: Program (upper 4 bits) + // BYTE 16: Program (lower 4 bits) part = get_part (p[0] & 0x0F); if (part) { part->set_onoff (p[2] & 0x01); @@ -2053,6 +2055,12 @@ void Player::parse_sysex(byte *p, uint len) { _se->reallocateMidiChannels (_midi); } } else { + // Even in cases where a program does not seem to be specified, + // i.e. bytes 15 and 16 are 0, we send a program change because + // 0 is a valid program number. MI2 tests show that in such + // cases, a regular program change message always seems to follow + // anyway. + part->_instrument.program ((p[15] & 0x0F) << 4 | (p[16] & 0x0F), _mt32emulate); part->sendAll(); } } |