[Scummvm-git-logs] scummvm master -> 786214093985b24c31f9828588d01130cabaa626

bluegr bluegr at gmail.com
Thu May 2 21:43:14 CEST 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7862140939 SCI: Change sendMidiCommand non-midi error to warn


Commit: 786214093985b24c31f9828588d01130cabaa626
    https://github.com/scummvm/scummvm/commit/786214093985b24c31f9828588d01130cabaa626
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2019-05-02T22:43:10+03:00

Commit Message:
SCI: Change sendMidiCommand non-midi error to warn

FPFP calls kDoSound SendMidi on non-midi sounds. Fixes bug #10952

Changed paths:
    engines/sci/sound/music.cpp


diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 700be3d..5977cf0 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);





More information about the Scummvm-git-logs mailing list