mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 20:59:00 +00:00
Fixed two off-by-one errors. One would cause the same frame of the Kyra 3 to be
displayed twice in a row. The other, more serious one, would cause ScummVM to crash when reaching the end of the music. Now the music loops properly. (It does fade down before looping, but that's how it is in the original as well. It's just the way the music is recorded.) svn-id: r22503
This commit is contained in:
parent
0099932d0d
commit
6bf1e10768
@ -90,7 +90,7 @@ int KyraEngine_v3::go() {
|
||||
delayUntil(nextRun);
|
||||
}
|
||||
|
||||
for (int i = 64; i >= 29; --i) {
|
||||
for (int i = 64; i > 29; --i) {
|
||||
uint32 nextRun = _system->getMillis() + 3 * _tickLength;
|
||||
logo->displayFrame(i);
|
||||
_screen->updateScreen();
|
||||
|
@ -133,7 +133,9 @@ int AUDStream::readChunk(int16 *buffer, const int maxSamples) {
|
||||
|
||||
// if no bytes of the old chunk are left, read the next one
|
||||
if (_bytesLeft <= 0) {
|
||||
if (_processedSize > _totalSize) {
|
||||
if (_processedSize >= _totalSize) {
|
||||
// TODO: Eventually, we're probably going to need the
|
||||
// ability to loop the sound. Add this here?
|
||||
_endOfData = true;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user