diff options
author | Max Horn | 2007-02-28 14:48:26 +0000 |
---|---|---|
committer | Max Horn | 2007-02-28 14:48:26 +0000 |
commit | 8c8abca6f80fc63b5c11fa43319cdf56b4845660 (patch) | |
tree | ec031a874e67c92d3640824c2ee9816b5b6cab90 /engines/scumm/imuse_digi/dimuse_sndmgr.cpp | |
parent | dea688d0f5303e552bff8ff22798719d92ed53c1 (diff) | |
download | scummvm-rg350-8c8abca6f80fc63b5c11fa43319cdf56b4845660.tar.gz scummvm-rg350-8c8abca6f80fc63b5c11fa43319cdf56b4845660.tar.bz2 scummvm-rg350-8c8abca6f80fc63b5c11fa43319cdf56b4845660.zip |
Changed the AppendableAudioStream code to use a queue of buffers, instead of a fixed size wrap-around memory buffer (this reduces memory usage in some cases by 500-700k, while actually being more flexible)
svn-id: r25909
Diffstat (limited to 'engines/scumm/imuse_digi/dimuse_sndmgr.cpp')
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_sndmgr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp index 2b88f37b17..5c7fa5b613 100644 --- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp +++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp @@ -583,11 +583,11 @@ int32 ImuseDigiSndMgr::getDataFromRegion(soundStruct *soundHandle, int region, b if ((soundHandle->bundle) && (!soundHandle->compressed)) { size = soundHandle->bundle->decompressSampleByCurIndex(start + offset, size, buf, header_size, header_outside); } else if (soundHandle->resPtr) { - *buf = (byte *)malloc(size); + *buf = new byte[size]; assert(*buf); memcpy(*buf, soundHandle->resPtr + start + offset + header_size, size); } else if ((soundHandle->bundle) && (soundHandle->compressed)) { - *buf = (byte *)malloc(size); + *buf = new byte[size]; assert(*buf); char fileName[24]; sprintf(fileName, "%s_reg%03d", soundHandle->name, region); |