From 811a6d4bb8581204a465bc00c66fdb00b3475bb3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 27 Dec 2003 16:32:16 +0000 Subject: append more data the first time around (this avoids a stutter problem, which was caused by an underrun of the audio stream; note that all this is just a temporary fix, once we switch to a 'pull' strategy as opposed to the current push, the problem will go away automatically, due to design :-) svn-id: r11973 --- scumm/imuse_digi.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scumm/imuse_digi.cpp b/scumm/imuse_digi.cpp index d498459004..e82088bd79 100644 --- a/scumm/imuse_digi.cpp +++ b/scumm/imuse_digi.cpp @@ -728,6 +728,10 @@ void IMuseDigital::callback() { } int32 mixer_size = _channel[l].mixerSize; + + assert(_channel[l].stream); + if (_channel[l].stream->endOfData()) + mixer_size *= 2; if (_channel[l].offset + mixer_size > _channel[l].size) { mixer_size = _channel[l].size - _channel[l].offset; @@ -738,7 +742,6 @@ void IMuseDigital::callback() { if (_scumm->_mixer->isReady()) { _scumm->_mixer->setChannelVolume(_channel[l].handle, _channel[l].vol / 1000); _scumm->_mixer->setChannelPan(_channel[l].handle, pan); - assert(_channel[l].stream); _channel[l].stream->append(_channel[l].data + _channel[l].offset, mixer_size); } _channel[l].offset += mixer_size; -- cgit v1.2.3