aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/fullpipe/sound.cpp')
-rw-r--r--engines/fullpipe/sound.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index cd6647177e..4ec8dd05ca 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -306,6 +306,13 @@ void FullpipeEngine::setSceneMusicParameters(GameVar *gvar) {
}
void FullpipeEngine::startSceneTrack() {
+ if (_sceneTrackIsPlaying) {
+ if (!_mixer->isSoundHandleActive(*_sceneTrackHandle)) { // Simulate end of sound callback
+ _sceneTrackIsPlaying = false;
+ _trackStartDelay = _musicMinDelay + (_musicMaxDelay - _musicMinDelay) * (_updateTicks % 10) / 9;
+ }
+ }
+
if (!_sceneTrackIsPlaying && _numSceneTracks > 0) {
if (_trackStartDelay > 0) {
_trackStartDelay--;