aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound/soundcmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/sound/soundcmd.cpp')
-rw-r--r--engines/sci/sound/soundcmd.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index f6059724f4..8c61173ed3 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -804,7 +804,11 @@ void SoundCommandParser::cmdUpdateCues(reg_t obj, int16 value) {
if (musicSlot->pStreamAud) {
// Update digital sound effect slots here
- uint currentLoopCounter = musicSlot->pStreamAud->getNumPlayedLoops();
+ uint currentLoopCounter = 0;
+
+ if (musicSlot->pLoopStream)
+ currentLoopCounter = musicSlot->pLoopStream->getCompleteIterations();
+
if (currentLoopCounter != musicSlot->sampleLoopCounter) {
// during last time we looped at least one time, update loop accordingly
musicSlot->loop -= currentLoopCounter - musicSlot->sampleLoopCounter;