[Scummvm-git-logs] scummvm master -> d30e952802c196aea0459418962533408485ccc4

antoniou79 noreply at scummvm.org
Sun May 8 16:07:12 UTC 2022


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:
d30e952802 BLADERUNNER: Mute music and sfx for on-demand outtakes


Commit: d30e952802c196aea0459418962533408485ccc4
    https://github.com/scummvm/scummvm/commit/d30e952802c196aea0459418962533408485ccc4
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2022-05-08T19:04:49+03:00

Commit Message:
BLADERUNNER: Mute music and sfx for on-demand outtakes

Changed paths:
    engines/bladerunner/bladerunner.cpp


diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp
index 2636e0755bd..97ec1707474 100644
--- a/engines/bladerunner/bladerunner.cpp
+++ b/engines/bladerunner/bladerunner.cpp
@@ -1219,13 +1219,21 @@ void BladeRunnerEngine::gameTick() {
 		//      Fixing this (storing ambient sounds and restoring them after the outtake has finished)
 		//      is too cumbersome to be worth it.
 		int ambientSoundsPreOuttakeVol = _mixer->getVolumeForSoundType(_mixer->kPlainSoundType);
+		int musicPreOuttakeVol = _mixer->getVolumeForSoundType(_mixer->kMusicSoundType);
+		int sfxPreOuttakeVol = _mixer->getVolumeForSoundType(_mixer->kSFXSoundType);
+		// Speech Sound Type (kSpeechSoundType) is the volume of the outtake video,
+		// so we don't mute that one
+		_mixer->setVolumeForSoundType(_mixer->kMusicSoundType, 0);
 		_mixer->setVolumeForSoundType(_mixer->kPlainSoundType, 0);
+		_mixer->setVolumeForSoundType(_mixer->kSFXSoundType, 0);
 		if (_debugger->_dbgPendingOuttake.outtakeId == -1 && _debugger->_dbgPendingOuttake.container < -1) {
 			outtakePlay(_debugger->_dbgPendingOuttake.externalFilename, _debugger->_dbgPendingOuttake.notLocalized, _debugger->_dbgPendingOuttake.container);
 		} else {
 			outtakePlay(_debugger->_dbgPendingOuttake.outtakeId, _debugger->_dbgPendingOuttake.notLocalized, _debugger->_dbgPendingOuttake.container);
 		}
+		_mixer->setVolumeForSoundType(_mixer->kSFXSoundType, sfxPreOuttakeVol);
 		_mixer->setVolumeForSoundType(_mixer->kPlainSoundType, ambientSoundsPreOuttakeVol);
+		_mixer->setVolumeForSoundType(_mixer->kMusicSoundType, musicPreOuttakeVol);
 		_debugger->resetPendingOuttake();
 	}
 




More information about the Scummvm-git-logs mailing list