aboutsummaryrefslogtreecommitdiff
path: root/scumm/imuse_digi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/imuse_digi.cpp')
-rw-r--r--scumm/imuse_digi.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/scumm/imuse_digi.cpp b/scumm/imuse_digi.cpp
index 6ec5293762..a1dbcc51b2 100644
--- a/scumm/imuse_digi.cpp
+++ b/scumm/imuse_digi.cpp
@@ -796,18 +796,15 @@ void IMuseDigital::mixerCallback() {
mixer_size &= ~1; // Size *must* be even, after all this is stereo data
- byte *buf = (byte *)malloc(mixer_size);
- memcpy(buf, _channel[l].data + _channel[l].offset, mixer_size);
- _channel[l].offset += mixer_size;
-
if (_scumm->_mixer->isReady()) {
if (!_channel[l].handle.isActive())
_scumm->_mixer->newStream(&_channel[l].handle, _channel[l].freq,
_channel[l].mixerFlags, 100000);
_scumm->_mixer->setChannelVolume(_channel[l].handle, _channel[l].vol / 1000);
_scumm->_mixer->setChannelPan(_channel[l].handle, _channel[l].pan);
- _scumm->_mixer->appendStream(_channel[l].handle, buf, mixer_size);
+ _scumm->_mixer->appendStream(_channel[l].handle, _channel[l].data + _channel[l].offset, mixer_size);
}
+ _channel[l].offset += mixer_size;
}
}
}