[Scummvm-git-logs] scummvm master -> 8d9dc0237436c6f8a9720cb9b8d9cc59e6382326

bluegr noreply at scummvm.org
Mon May 23 20:23:10 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:
8d9dc02374 SCUMM: Change the HE lipsync timer math to a cleaner and safer version


Commit: 8d9dc0237436c6f8a9720cb9b8d9cc59e6382326
    https://github.com/scummvm/scummvm/commit/8d9dc0237436c6f8a9720cb9b8d9cc59e6382326
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-05-23T23:22:45+03:00

Commit Message:
SCUMM: Change the HE lipsync timer math to a cleaner and safer version

Changed paths:
    engines/scumm/he/sound_he.cpp


diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index 9e3b3e8c454..37303347bb0 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -658,7 +658,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags,
 			// can do without it, using a LoopingAudioStream.
 
 			if (_heChannel[heChannel].timer)
-				_heChannel[heChannel].timer = size / nChan * samplesPerBlock / blockAlign * 1000 / rate;
+				_heChannel[heChannel].timer = (int)(((int64)size * samplesPerBlock * 1000) / ((int64)rate * blockAlign * nChan));
 
 			byte *sound = (byte *)malloc(size * 4);
 			/* On systems where it matters, malloc will return




More information about the Scummvm-git-logs mailing list