aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-12-27 16:32:16 +0000
committerMax Horn2003-12-27 16:32:16 +0000
commit811a6d4bb8581204a465bc00c66fdb00b3475bb3 (patch)
tree22866555541e77ebd8f68ba1fcc0968b7ea2ddcf
parent16971b582bccd013a9b9887a14583bbf47432235 (diff)
downloadscummvm-rg350-811a6d4bb8581204a465bc00c66fdb00b3475bb3.tar.gz
scummvm-rg350-811a6d4bb8581204a465bc00c66fdb00b3475bb3.tar.bz2
scummvm-rg350-811a6d4bb8581204a465bc00c66fdb00b3475bb3.zip
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
-rw-r--r--scumm/imuse_digi.cpp5
1 files changed, 4 insertions, 1 deletions
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;