aboutsummaryrefslogtreecommitdiff
path: root/scumm/imuse_digi.cpp
diff options
context:
space:
mode:
authorMax Horn2003-12-24 16:52:57 +0000
committerMax Horn2003-12-24 16:52:57 +0000
commit289877a5f0b6e9a95e82a00525d2abeaf0f5ecdb (patch)
treedbd76b18b88a7f4c76a82b406b0096a6e278b3a3 /scumm/imuse_digi.cpp
parent03677b2d65e7e80f12832694cfb7b656fc45433a (diff)
downloadscummvm-rg350-289877a5f0b6e9a95e82a00525d2abeaf0f5ecdb.tar.gz
scummvm-rg350-289877a5f0b6e9a95e82a00525d2abeaf0f5ecdb.tar.bz2
scummvm-rg350-289877a5f0b6e9a95e82a00525d2abeaf0f5ecdb.zip
cleanup (code should be 100% equivalent)
svn-id: r11889
Diffstat (limited to 'scumm/imuse_digi.cpp')
-rw-r--r--scumm/imuse_digi.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/scumm/imuse_digi.cpp b/scumm/imuse_digi.cpp
index fc577011ec..29848aeab0 100644
--- a/scumm/imuse_digi.cpp
+++ b/scumm/imuse_digi.cpp
@@ -787,21 +787,15 @@ void IMuseDigital::mixerCallback() {
debug(5, "Fade: sound(%d), Vol(%d)", _channel[l].idSound, _channel[l].vol / 1000);
}
- int32 new_size = _channel[l].mixerSize;
- int32 mixer_size = new_size;
+ int32 mixer_size = _channel[l].mixerSize;
if (_channel[l].offset + mixer_size > _channel[l].size) {
- new_size = _channel[l].size - _channel[l].offset;
- }
-
- if (_channel[l].offset + mixer_size > _channel[l].size) {
- new_size = _channel[l].size - _channel[l].offset;
+ mixer_size = _channel[l].size - _channel[l].offset;
_channel[l].toBeRemoved = true;
- mixer_size = new_size;
}
byte *buf = (byte *)malloc(mixer_size);
- memcpy(buf, _channel[l].data + _channel[l].offset, new_size);
+ memcpy(buf, _channel[l].data + _channel[l].offset, mixer_size);
_channel[l].offset += mixer_size;
if (_scumm->_silentDigitalImuse == false) {