aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/imuse_digi/dimuse.cpp2
-rw-r--r--engines/scumm/imuse_digi/dimuse_bndmgr.cpp2
-rw-r--r--engines/scumm/imuse_digi/dimuse_codecs.cpp2
-rw-r--r--engines/scumm/imuse_digi/dimuse_sndmgr.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp
index 54908ee445..1874546259 100644
--- a/engines/scumm/imuse_digi/dimuse.cpp
+++ b/engines/scumm/imuse_digi/dimuse.cpp
@@ -302,7 +302,7 @@ void IMuseDigital::callback() {
int tmpFeedSize = _sound->getDataFromRegion(track->soundDesc, track->curRegion, &tmpPtr, tmpOffset, tmpFeedSize12Bits);
curFeedSize = BundleCodecs::decode12BitsSample(tmpPtr, &tmpSndBufferPtr, tmpFeedSize);
- free(tmpPtr);
+ delete[] tmpPtr;
} else if (bits == 16) {
curFeedSize = _sound->getDataFromRegion(track->soundDesc, track->curRegion, &tmpSndBufferPtr, track->regionOffset, feedSize);
if (channels == 1) {
diff --git a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
index f0b4bc131b..a88faed3db 100644
--- a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
@@ -281,7 +281,7 @@ int32 BundleMgr::decompressSampleByIndex(int32 index, int32 offset, int32 size,
lastBlock = _numCompItems - 1;
int32 blocksFinalSize = 0x2000 * (1 + lastBlock - firstBlock);
- *compFinal = (byte *)malloc(blocksFinalSize);
+ *compFinal = new byte[blocksFinalSize];
assert(*compFinal);
finalSize = 0;
diff --git a/engines/scumm/imuse_digi/dimuse_codecs.cpp b/engines/scumm/imuse_digi/dimuse_codecs.cpp
index 8ff8bd2461..e4bce827c4 100644
--- a/engines/scumm/imuse_digi/dimuse_codecs.cpp
+++ b/engines/scumm/imuse_digi/dimuse_codecs.cpp
@@ -34,7 +34,7 @@ namespace BundleCodecs {
uint32 decode12BitsSample(const byte *src, byte **dst, uint32 size) {
uint32 loop_size = size / 3;
uint32 s_size = loop_size * 4;
- byte *ptr = *dst = (byte *)malloc(s_size);
+ byte *ptr = *dst = new byte[s_size];
assert(ptr);
uint32 tmp;
diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
index 2686696684..35eb421be6 100644
--- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
@@ -461,7 +461,7 @@ ImuseDigiSndMgr::SoundDesc *ImuseDigiSndMgr::openSound(int32 soundId, const char
sound->disk = _disk;
prepareSound(ptr, sound);
if ((soundType == IMUSE_BUNDLE) && !sound->compressed) {
- free(ptr);
+ delete[] ptr;
}
return sound;
}