From 48e5ec67ffcc3f45816507d53d7b276414a31867 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 28 Oct 2006 00:18:13 +0000 Subject: SCUMM: Further SMUSH audio channel cleanup; this time unified some code, and got rid of one set of memory buffers svn-id: r24542 --- engines/scumm/smush/saud_channel.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'engines/scumm/smush/saud_channel.cpp') 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 -- cgit v1.2.3