diff options
author | Max Horn | 2006-10-28 00:18:13 +0000 |
---|---|---|
committer | Max Horn | 2006-10-28 00:18:13 +0000 |
commit | 48e5ec67ffcc3f45816507d53d7b276414a31867 (patch) | |
tree | cf4b88062da3f829b45aadb980c3bf25c64006cd /engines/scumm/smush/saud_channel.cpp | |
parent | d90762c430d9ee20ca4137d324aac5dc8308fdd6 (diff) | |
download | scummvm-rg350-48e5ec67ffcc3f45816507d53d7b276414a31867.tar.gz scummvm-rg350-48e5ec67ffcc3f45816507d53d7b276414a31867.tar.bz2 scummvm-rg350-48e5ec67ffcc3f45816507d53d7b276414a31867.zip |
SCUMM: Further SMUSH audio channel cleanup; this time unified some code, and got rid of one set of memory buffers
svn-id: r24542
Diffstat (limited to 'engines/scumm/smush/saud_channel.cpp')
-rw-r--r-- | engines/scumm/smush/saud_channel.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/scumm/smush/saud_channel.cpp b/engines/scumm/smush/saud_channel.cpp index 86ed7811ca..befeadad91 100644 --- a/engines/scumm/smush/saud_channel.cpp +++ b/engines/scumm/smush/saud_channel.cpp @@ -180,17 +180,17 @@ bool SaudChannel::appendData(Chunk &b, int32 size) { return true; } -int32 SaudChannel::getAvailableSoundDataSize(void) const { - return _sbufferSize; -} +byte *SaudChannel::getSoundData() { + byte *tmp = _sbuffer; -void SaudChannel::getSoundData(int8 *snd, int32 size) { - memcpy(snd, _sbuffer, size); + assert(_dataSize > 0); if (!_keepSize) - _dataSize -= size; - delete []_sbuffer; + _dataSize -= _sbufferSize; + _sbuffer = 0; _sbufferSize = 0; + + return tmp; } } // End of namespace Scumm |