Opened 6 months ago
Closed 5 months ago
#15152 closed defect (fixed)
SCUMM: MONKEY2: Wrong instruments used in MT-32 playback
Reported by: | gabberhead | Owned by: | athrxx |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | ||
Cc: | Game: | Monkey Island 2 |
Description
here is 1 mp3 file with the problem with the newest daily build and 1 file with the right instruments used with stable 2.8.1. i mean the short part in the middle.
i am using munt 2.7.0 for mt32 emulation. roms are cm32l. i noticed it today. i dont know, when this problem began and also i dont know, if other games are also effected by this problem.
Attachments (2)
Change History (9)
by , 6 months ago
Attachment: | 2.8.1 stable - right.mp3 added |
---|
by , 6 months ago
Attachment: | newest daily build - wrong.mp3 added |
---|
comment:1 by , 6 months ago
Game: | → Monkey Island 2 |
---|---|
Summary: | monkey island 2 - mt32 - wrong instruments used → SCUMM: MONKEY2: Wrong instruments used in MT-32 playback |
comment:2 by , 6 months ago
comment:3 by , 6 months ago
It can be fixed by removing the call to player->uninit_parts();
in sysex_scumm.cpp, line 122. The Indy 4 imuse driver seems to make that call, though, so I am not yet convinced that the removal is a good idea. I'll check what the MI2 driver does (should be the same as Indy 4, but who knows...).
comment:4 by , 5 months ago
Owner: | set to |
---|---|
Resolution: | → pending |
Status: | new → pending |
I have made a fix. Please test if it works as intended...
comment:5 by , 5 months ago
I'm not the original reporter, of course, but it seems to work for me. But the condition in sysExNoDelay() looks a bit funny, and GCC warns about it:
if (_isMT32 && (!_scanning && (msg[0] == IMUSE_SYSEX_ID && msg[1] == 0) || msg[0] == ROLAND_SYSEX_ID)) return length >= 25 ? 70 : 20;
engines/scumm/imuse/imuse_player.cpp: In member function ‘virtual uint16 Scumm::Player::sysExNoDelay(const byte*, uint16)’: engines/scumm/imuse/imuse_player.cpp:480:36: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] 480 | if (_isMT32 && (!_scanning && (msg[0] == IMUSE_SYSEX_ID && msg[1] == 0) || msg[0] == ROLAND_SYSEX_ID)) | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So as long as msg[0] == ROLAND_SYSEX_ID
the whole condition will be true, regardless of _isMT32
and !_scanning
, right? Was it supposed to look like this instead?
if (_isMT32 && !_scanning && ((msg[0] == IMUSE_SYSEX_ID && msg[1] == 0) || msg[0] == ROLAND_SYSEX_ID)) return length >= 25 ? 70 : 20;
comment:7 by , 5 months ago
Resolution: | pending → fixed |
---|---|
Status: | pending → closed |
Thanks for testing again!
It only seems to happen when you skip the first part, not if you let it play uninterrupted. Bisecting points to this commit: