[Scummvm-git-logs] scummvm master -> 629b121e1771c217d5173a2d066ad4786bc15dd3

bluegr bluegr at gmail.com
Sun Aug 30 13:13:02 UTC 2020


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:
629b121e17 ZVISION: Work around music playing over Charon cutscenes


Commit: 629b121e1771c217d5173a2d066ad4786bc15dd3
    https://github.com/scummvm/scummvm/commit/629b121e1771c217d5173a2d066ad4786bc15dd3
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2020-08-30T16:12:58+03:00

Commit Message:
ZVISION: Work around music playing over Charon cutscenes

When riding with Charon in one direction, the script stops the
background sounds. When you ride in the other direction, it doesn't.
Since the cutscenes play music, you may now have two pieces of music
playing over each other. Work around this by pausing the mixer during
the cuscenes (there are two different ones) for going back.

Changed paths:
    engines/zvision/scripting/actions.cpp


diff --git a/engines/zvision/scripting/actions.cpp b/engines/zvision/scripting/actions.cpp
index 4dfb7ecd25..3fbe98c168 100644
--- a/engines/zvision/scripting/actions.cpp
+++ b/engines/zvision/scripting/actions.cpp
@@ -1000,8 +1000,28 @@ bool ActionStreamVideo::execute() {
 		_engine->getRenderManager()->initSubArea(HIRES_WINDOW_WIDTH, HIRES_WINDOW_HEIGHT, workingWindow);
 	}
 
+	// WORKAROUND for what appears to be a script bug. When riding with
+	// Charon in one direction, the game issues a command to kill the
+	// universe_hades_sound_task. When going in the other direction (either
+	// as yourself or as the two-headed beast) it does not. Since the
+	// cutscene plays music, there may be two pieces of music playing
+	// simultaneously during the ride.
+	//
+	// Rather than mucking about with killing and restarting the sound,
+	// simply pause the ScummVM mixer during the ride.
+
+	bool pauseBackgroundMusic = _engine->getGameId() == GID_GRANDINQUISITOR && (_fileName == "hp3ea021.avi" || _fileName == "hp4ea051.avi");
+
+	if (pauseBackgroundMusic) {
+		_engine->_mixer->pauseAll(true);
+	}
+
 	_engine->playVideo(*decoder, destRect, _skippable, sub);
 
+	if (pauseBackgroundMusic) {
+		_engine->_mixer->pauseAll(false);
+	}
+
 	if (switchToHires) {
 		_engine->initScreen();
 		_engine->getRenderManager()->initSubArea(WINDOW_WIDTH, WINDOW_HEIGHT, _engine->_workingWindow);




More information about the Scummvm-git-logs mailing list