aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2006-02-16 13:45:52 +0000
committerTravis Howell2006-02-16 13:45:52 +0000
commitd4e2b25e5d971eacc472f4ed1ff7efc50aeaa449 (patch)
treea63787ff5be35bf8b049259ad872f753ffdc8ded /engines
parenta2bc3ef67cca71f828f15f78f39c0ed77c3c7122 (diff)
downloadscummvm-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.cpp13
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;
}