[Scummvm-git-logs] scummvm master -> b3b2111e3b7110c3ad7ba300430c20d810bc304d
neuromancer
noreply at scummvm.org
Tue Nov 18 20:24:38 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
b3b2111e3b PRIVATE: Wait for police bust audio to complete
Commit: b3b2111e3b7110c3ad7ba300430c20d810bc304d
https://github.com/scummvm/scummvm/commit/b3b2111e3b7110c3ad7ba300430c20d810bc304d
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-18T21:24:33+01:00
Commit Message:
PRIVATE: Wait for police bust audio to complete
Fixes Marlowe's speech not playing on the second police bust.
The police bust video would immediately stop the audio.
Changed paths:
engines/private/funcs.cpp
engines/private/private.cpp
engines/private/private.h
diff --git a/engines/private/funcs.cpp b/engines/private/funcs.cpp
index 31aa6d164d8..6a163abec6b 100644
--- a/engines/private/funcs.cpp
+++ b/engines/private/funcs.cpp
@@ -178,12 +178,7 @@ static void fSyncSound(ArgArray args) {
g_private->drawScreen();
g_private->playSound(s, 1, true, false);
- while (g_private->isSoundActive())
- g_private->ignoreEvents();
-
- uint32 i = 100;
- while (i--) // one second extra
- g_private->ignoreEvents();
+ g_private->waitForSoundToStop();
}
}
@@ -265,6 +260,8 @@ static void fBustMovie(ArgArray args) {
if (kPoliceBustVideos[videoIndex] == 2) {
Common::String s("global/transiti/audio/spoc02VO.wav");
g_private->playSound(s, 1, false, false);
+ g_private->changeCursor("default");
+ g_private->waitForSoundToStop();
}
g_private->_nextMovie = pv;
diff --git a/engines/private/private.cpp b/engines/private/private.cpp
index 61ae24f10a1..95a7ef53760 100644
--- a/engines/private/private.cpp
+++ b/engines/private/private.cpp
@@ -1601,6 +1601,15 @@ bool PrivateEngine::isSoundActive() {
return _mixer->isSoundIDActive(-1);
}
+void PrivateEngine::waitForSoundToStop() {
+ while (g_private->isSoundActive())
+ g_private->ignoreEvents();
+
+ uint32 i = 100;
+ while (i--) // one second extra
+ g_private->ignoreEvents();
+}
+
void PrivateEngine::adjustSubtitleSize() {
debugC(1, kPrivateDebugFunction, "%s()", __FUNCTION__);
if (_subtitles) {
diff --git a/engines/private/private.h b/engines/private/private.h
index b6d542a179a..c2f9b99bf46 100644
--- a/engines/private/private.h
+++ b/engines/private/private.h
@@ -371,6 +371,7 @@ public:
void playSound(const Common::String &, uint, bool, bool);
void stopSound(bool);
bool isSoundActive();
+ void waitForSoundToStop();
bool _noStopSounds;
Common::String getPaperShuffleSound();
More information about the Scummvm-git-logs
mailing list