From a2f0c1aee63c0c96096a3d420096c7c806e4d80f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 28 Sep 2022 03:40:10 -0700 Subject: [PATCH] Update the audio offset when skipping a full update --- src/common/cutscenes/movieplayer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/cutscenes/movieplayer.cpp b/src/common/cutscenes/movieplayer.cpp index 004e3970d3..892da88719 100644 --- a/src/common/cutscenes/movieplayer.cpp +++ b/src/common/cutscenes/movieplayer.cpp @@ -281,14 +281,15 @@ public: if(!ZMusic_FillStream(MusicStream, buff, len)) return false; + // Offset the measured audio position to account for the skipped samples. + audiooffset += skip/framesize; + if(skip == len) return ZMusic_FillStream(MusicStream, buff, len); memmove(buff, (char*)buff+skip, len-skip); if(!ZMusic_FillStream(MusicStream, (char*)buff+len-skip, skip)) memset((char*)buff+len-skip, 0, skip); - // Offset the measured audio position to account for the skipped samples. - audiooffset += skip/framesize; return true; }