From 5edb6f9e4a331049e49c04441aa36b67053f605c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 Jul 2011 17:58:41 +0200 Subject: SCUMM: Fix priority settings in iMuse allocate part sysEx command. Formerly we ever only used the lower 4 bit of the priority setting for a new part. The original used a full 8 bit setting though (based on the Indy4 PC Speaker output driver). This fixes missing notes in the Indy4 intro with PC Speaker output. This might affect other outputs too! And could cause regressions in case other outputs implemented priority settings differently. --- engines/scumm/imuse/sysex_scumm.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/scumm') diff --git a/engines/scumm/imuse/sysex_scumm.cpp b/engines/scumm/imuse/sysex_scumm.cpp index 0987ab5553..98b8ed934e 100644 --- a/engines/scumm/imuse/sysex_scumm.cpp +++ b/engines/scumm/imuse/sysex_scumm.cpp @@ -54,7 +54,8 @@ void sysexHandler_Scumm(Player *player, const byte *msg, uint16 len) { // BYTE 00: Channel # // BYTE 02: BIT 01(0x01): Part on?(1 = yes) // BIT 02(0x02): Reverb? (1 = yes) [bug #1088045] - // BYTE 04: Priority adjustment [guessing] + // BYTE 03: Priority adjustment(upper 4 bits) + // BYTE 04: Priority adjustment(lower 4 bits) // BYTE 05: Volume(upper 4 bits) [guessing] // BYTE 06: Volume(lower 4 bits) [guessing] // BYTE 07: Pan(upper 4 bits) [bug #1088045] @@ -73,7 +74,7 @@ void sysexHandler_Scumm(Player *player, const byte *msg, uint16 len) { if (part) { part->set_onoff(p[2] & 0x01); part->effectLevel((p[2] & 0x02) ? 127 : 0); - part->set_pri(p[4]); + part->set_pri((p[3] << 4) | p[4]); part->volume((p[5] & 0x0F) << 4 |(p[6] & 0x0F)); part->set_pan((p[7] & 0x0F) << 4 | (p[8] & 0x0F)); part->_percussion = player->_isMIDI ? ((p[9] & 0x08) > 0) : false; -- cgit v1.2.3