[Scummvm-git-logs] scummvm branch-2-2 -> 585e2b7e1f87b7bfa6b928dd7b1f562a74071e8a

sev- sev at scummvm.org
Wed Sep 2 08:30:21 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:
585e2b7e1f ZVISION: Work around music playing over Charon cutscenes


Commit: 585e2b7e1f87b7bfa6b928dd7b1f562a74071e8a
    https://github.com/scummvm/scummvm/commit/585e2b7e1f87b7bfa6b928dd7b1f562a74071e8a
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2020-09-02T10:30:07+02: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