diff options
author | Travis Howell | 2006-02-16 13:45:52 +0000 |
---|---|---|
committer | Travis Howell | 2006-02-16 13:45:52 +0000 |
commit | d4e2b25e5d971eacc472f4ed1ff7efc50aeaa449 (patch) | |
tree | a63787ff5be35bf8b049259ad872f753ffdc8ded /engines | |
parent | a2bc3ef67cca71f828f15f78f39c0ed77c3c7122 (diff) | |
download | scummvm-rg350-d4e2b25e5d971eacc472f4ed1ff7efc50aeaa449.tar.gz scummvm-rg350-d4e2b25e5d971eacc472f4ed1ff7efc50aeaa449.tar.bz2 scummvm-rg350-d4e2b25e5d971eacc472f4ed1ff7efc50aeaa449.zip |
Stop music in HE games, before nuking the resource
svn-id: r20727
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/he/sound_he.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index 5bf8cb3f54..5ed135cd8a 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -367,18 +367,13 @@ void Sound::playHESound(int soundID, int heOffset, int heChannel, int heFlags) { musicFile.seek(music_offs, SEEK_SET); - if (_vm->_heversion == 70) { - spoolPtr = (byte *)malloc(size); - musicFile.read(spoolPtr, size); - } else { - spoolPtr = _vm->res.createResource(rtSpoolBuffer, heChannel, size); - assert(spoolPtr); - musicFile.read(spoolPtr, size); - } + _vm->_mixer->stopHandle(_heSoundChannels[heChannel]); + spoolPtr = _vm->res.createResource(rtSpoolBuffer, heChannel, size); + assert(spoolPtr); + musicFile.read(spoolPtr, size); musicFile.close(); if (_vm->_heversion == 70) { - _vm->_mixer->stopHandle(_heSoundChannels[heChannel]); _vm->_mixer->playRaw(&_heSoundChannels[heChannel], spoolPtr, size, 11025, flags, soundID); return; } |