diff options
author | Travis Howell | 2009-06-03 00:55:36 +0000 |
---|---|---|
committer | Travis Howell | 2009-06-03 00:55:36 +0000 |
commit | a34fb64f09691ed631867f72f313b1d7dcae3bde (patch) | |
tree | 113119017bcb2b8af12ddcb5822f8a955740913a /engines/scumm | |
parent | fc4d1c0affc2623ec5f35d3e10c6c0297eb01a25 (diff) | |
download | scummvm-rg350-a34fb64f09691ed631867f72f313b1d7dcae3bde.tar.gz scummvm-rg350-a34fb64f09691ed631867f72f313b1d7dcae3bde.tar.bz2 scummvm-rg350-a34fb64f09691ed631867f72f313b1d7dcae3bde.zip |
Correct sound timer and disable sound offsets, in later HE games.
svn-id: r41132
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/he/sound_he.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index 10c0b0153e..c5a8988edb 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -619,6 +619,9 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) assert(heOffset >= 0 && heOffset < size); + // FIXME: Disabled sound offsets, due to asserts been triggered + heOffset = 0; + _vm->setHETimer(heChannel + 4); _heChannel[heChannel].sound = soundID; _heChannel[heChannel].priority = priority; @@ -638,14 +641,14 @@ 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. delete voxStream; + if (_heChannel[heChannel].timer) + _heChannel[heChannel].timer = size * 1000 / rate; + flags |= Audio::Mixer::FLAG_AUTOFREE; _mixer->playRaw(type, &_heSoundChannels[heChannel], sound + heOffset, size - heOffset, rate, flags, soundID); } else { |