aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2009-01-10 10:38:06 +0000
committerTravis Howell2009-01-10 10:38:06 +0000
commit6c27a9f00818ce98b7fe1d68fcf237c4b60396da (patch)
tree1a9c3986b72fbe6734f32c6389b1e2dd51b3c6fc /engines
parentd39c075eafe418a520684f4de327ccb42b486d94 (diff)
downloadscummvm-rg350-6c27a9f00818ce98b7fe1d68fcf237c4b60396da.tar.gz
scummvm-rg350-6c27a9f00818ce98b7fe1d68fcf237c4b60396da.tar.bz2
scummvm-rg350-6c27a9f00818ce98b7fe1d68fcf237c4b60396da.zip
Correct sound timer, when sound compression is used in HE games.
svn-id: r35800
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/he/sound_he.cpp3
1 files changed, 3 insertions, 0 deletions
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.