diff options
-rw-r--r-- | scumm/imuse_digi/dimuse_bndmgr.cpp | 5 | ||||
-rw-r--r-- | scumm/imuse_digi/dimuse_sndmgr.cpp | 2 | ||||
-rw-r--r-- | scumm/sound.cpp | 1 | ||||
-rw-r--r-- | scumm/sound_he.cpp | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/scumm/imuse_digi/dimuse_bndmgr.cpp b/scumm/imuse_digi/dimuse_bndmgr.cpp index 1da812bc9f..f603256e2a 100644 --- a/scumm/imuse_digi/dimuse_bndmgr.cpp +++ b/scumm/imuse_digi/dimuse_bndmgr.cpp @@ -32,13 +32,14 @@ BundleDirCache::BundleDirCache() { _budleDirCache[fileId].fileName[0] = 0; _budleDirCache[fileId].numFiles = 0; _budleDirCache[fileId].compressedBun = false; + _budleDirCache[fileId].indexTable = NULL; } } BundleDirCache::~BundleDirCache() { for (int fileId = 0; fileId < ARRAYSIZE(_budleDirCache); fileId++) { - if (_budleDirCache[fileId].bundleTable != NULL) - free (_budleDirCache[fileId].bundleTable); + free(_budleDirCache[fileId].bundleTable); + free(_budleDirCache[fileId].indexTable); } } diff --git a/scumm/imuse_digi/dimuse_sndmgr.cpp b/scumm/imuse_digi/dimuse_sndmgr.cpp index 935b12ddb8..485f27a9c3 100644 --- a/scumm/imuse_digi/dimuse_sndmgr.cpp +++ b/scumm/imuse_digi/dimuse_sndmgr.cpp @@ -48,6 +48,8 @@ ImuseDigiSndMgr::~ImuseDigiSndMgr() { for (int l = 0; l < MAX_IMUSE_SOUNDS; l++) { closeSound(&_sounds[l]); } + + delete _cacheBundleDir; } void ImuseDigiSndMgr::countElements(byte *ptr, int &numRegions, int &numJumps, int &numSyncs) { diff --git a/scumm/sound.cpp b/scumm/sound.cpp index bcccb6c6c6..588e204c7a 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -77,6 +77,7 @@ Sound::Sound(ScummEngine *parent) _currentMusic(0), _soundsPaused(false), _sfxMode(0), + _heMusic(0), _heMusicTracks(0) { memset(_heChannel, 0, sizeof(_heChannel)); diff --git a/scumm/sound_he.cpp b/scumm/sound_he.cpp index 1dc1f66ebf..f654eeff95 100644 --- a/scumm/sound_he.cpp +++ b/scumm/sound_he.cpp @@ -404,7 +404,7 @@ void Sound::playHESound(int soundID, int heOffset, int heChannel, int heFlags) { sound = (char *)malloc(size * 4); size = voxStream->readBuffer((int16*)sound, size * 2); size *= 2; // 16bits. - delete(voxStream); + delete voxStream; } else { // Allocate a sound buffer, copy the data into it, and play sound = (char *)malloc(size); |