diff options
Diffstat (limited to 'engines/scumm/he')
-rw-r--r-- | engines/scumm/he/sound_he.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index da830515e2..0ded0cbeae 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -659,10 +659,12 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) size = READ_BE_UINT32(ptr + 4) - 8; flags = Audio::Mixer::FLAG_AUTOFREE; + byte *sound = (byte *)malloc(size); + memcpy(sound, ptr + 8, size); _mixer->stopID(_currentMusic); _currentMusic = soundID; - _mixer->playRaw(Audio::Mixer::kMusicSoundType, NULL, ptr + 8, size, rate, flags, soundID); + _mixer->playRaw(Audio::Mixer::kMusicSoundType, NULL, sound, size, rate, flags, soundID); } else if (READ_BE_UINT32(ptr) == MKID_BE('MIDI')) { if (_vm->_imuse) { |