aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/smush/saud_channel.cpp
diff options
context:
space:
mode:
authorMax Horn2006-10-28 00:04:50 +0000
committerMax Horn2006-10-28 00:04:50 +0000
commitd90762c430d9ee20ca4137d324aac5dc8308fdd6 (patch)
treea3b54e9f1c538a42900fbc61f4d1d054f35a5c57 /engines/scumm/smush/saud_channel.cpp
parenta6fee09adf6687d434d566b292f23fa9ca064c21 (diff)
downloadscummvm-rg350-d90762c430d9ee20ca4137d324aac5dc8308fdd6.tar.gz
scummvm-rg350-d90762c430d9ee20ca4137d324aac5dc8308fdd6.tar.bz2
scummvm-rg350-d90762c430d9ee20ca4137d324aac5dc8308fdd6.zip
SCUMM: Changed SaudChannel to return 8bit mono data (the mixer will do any necessary conversions for us, no need to waste memory like this); fix SmushMixer to not allocate buffers twice as big as necessary
svn-id: r24541
Diffstat (limited to 'engines/scumm/smush/saud_channel.cpp')
-rw-r--r--engines/scumm/smush/saud_channel.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/scumm/smush/saud_channel.cpp b/engines/scumm/smush/saud_channel.cpp
index 25066f85cf..86ed7811ca 100644
--- a/engines/scumm/smush/saud_channel.cpp
+++ b/engines/scumm/smush/saud_channel.cpp
@@ -184,11 +184,8 @@ int32 SaudChannel::getAvailableSoundDataSize(void) const {
return _sbufferSize;
}
-void SaudChannel::getSoundData(int16 *snd, int32 size) {
- for (int32 i = 0; i < size; i++) {
- snd[2 * i] = TO_LE_16(_sbuffer[i] ^ 0x80);
- snd[2 * i + 1] = TO_LE_16(_sbuffer[i] ^ 0x80);
- }
+void SaudChannel::getSoundData(int8 *snd, int32 size) {
+ memcpy(snd, _sbuffer, size);
if (!_keepSize)
_dataSize -= size;
delete []_sbuffer;