[Scummvm-cvs-logs] CVS: scummvm/scumm imuse_digi.cpp,1.101,1.102
Max Horn
fingolfin at users.sourceforge.net
Sat Dec 27 08:33:02 CET 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv15003
Modified Files:
imuse_digi.cpp
Log Message:
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 :-)
Index: imuse_digi.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_digi.cpp,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- imuse_digi.cpp 27 Dec 2003 16:19:06 -0000 1.101
+++ imuse_digi.cpp 27 Dec 2003 16:32:16 -0000 1.102
@@ -728,6 +728,10 @@
}
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 @@
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;
More information about the Scummvm-git-logs
mailing list