From 6ac4c9dedbe3d05f5424a4268c08fbaec86287d9 Mon Sep 17 00:00:00 2001 From: Kirben Date: Thu, 25 Feb 2016 20:46:47 +1100 Subject: SCUMM: Fix the lip sync animation in later HE games. --- engines/scumm/he/sound_he.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/scumm') diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index a78aff96f8..b806a9f3cc 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -636,7 +636,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) if (heFlags & 1) { _heChannel[heChannel].timer = 0; } else { - _heChannel[heChannel].timer = size * 1000 / rate; + _heChannel[heChannel].timer = size * 1000 / (rate * blockAlign); } _mixer->stopHandle(_heSoundChannels[heChannel]); @@ -658,7 +658,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) _heChannel[heChannel].rate = rate; if (_heChannel[heChannel].timer) - _heChannel[heChannel].timer = size * 1000 / rate; + _heChannel[heChannel].timer = size * 1000 / (rate * blockAlign); // makeADPCMStream returns a stream in native endianness, but RawMemoryStream // defaults to big endian. If we're on a little endian system, set the LE flag. -- cgit v1.2.3