From 6c27a9f00818ce98b7fe1d68fcf237c4b60396da Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 10 Jan 2009 10:38:06 +0000 Subject: Correct sound timer, when sound compression is used in HE games. svn-id: r35800 --- engines/scumm/he/sound_he.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/scumm/he') diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index 3a8c90b713..3466185c97 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -637,6 +637,9 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) if (compType == 17) { Audio::AudioStream *voxStream = Audio::makeADPCMStream(&stream, false, size, Audio::kADPCMMSIma, rate, (flags & Audio::Mixer::FLAG_STEREO) ? 2 : 1, blockAlign); + if (_heChannel[heChannel].timer) + _heChannel[heChannel].timer = size * 1000 / rate; + sound = (char *)malloc(size * 4); size = voxStream->readBuffer((int16*)sound, size * 2); size *= 2; // 16bits. -- cgit v1.2.3