From 786214093985b24c31f9828588d01130cabaa626 Mon Sep 17 00:00:00 2001 From: sluicebox Date: Sun, 28 Apr 2019 16:17:47 -0700 Subject: SCI: Change sendMidiCommand non-midi error to warn FPFP calls kDoSound SendMidi on non-midi sounds. Fixes bug #10952 --- engines/sci/sound/music.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 700be3d05f..5977cf0177 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -800,8 +800,15 @@ void SciMusic::sendMidiCommand(uint32 cmd) { void SciMusic::sendMidiCommand(MusicEntry *pSnd, uint32 cmd) { Common::StackLock lock(_mutex); - if (!pSnd->pMidiParser) - error("tried to cmdSendMidi on non midi slot (%04x:%04x)", PRINT_REG(pSnd->soundObj)); + if (!pSnd->pMidiParser) { + // FPFP calls kDoSound SendMidi to mute and unmute its gameMusic2 sound + // object but some scenes set this to an audio sample. In Act 2, room + // 660 sets this to audio of restaurant customers talking. Walking up + // the hotel stairs from room 500 to 235 calls gameMusic2:mute and + // triggers this if gameMusic2 hasn't changed. Bug #10952 + warning("tried to cmdSendMidi on non midi slot (%04x:%04x)", PRINT_REG(pSnd->soundObj)); + return; + } pSnd->pMidiParser->mainThreadBegin(); pSnd->pMidiParser->sendFromScriptToDriver(cmd); -- cgit v1.2.3