mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
SCI: don't let TimerSongIterator loop forever, and don't immediately
signal completion when starting it. This fixes a sync issue with the departing spaceship at the start of SQ4CD (after the intro). svn-id: r42385
This commit is contained in:
parent
1c02b93b70
commit
8dd3492194
@ -823,7 +823,6 @@ reg_t kDoSound_SCI1(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
||||
sampleLen = s->_sound.startAudio(65535, number);
|
||||
// Also create iterator, that will fire SI_FINISHED event, when the sound is done playing
|
||||
s->_sound.sfx_add_song(build_timeriterator(s, sampleLen), 0, handle, number);
|
||||
PUT_SEL32V(obj, signal, sampleLen);
|
||||
} else {
|
||||
if (!s->resmgr->testResource(ResourceId(kResourceTypeSound, number))) {
|
||||
warning("Could not open song number %d", number);
|
||||
|
@ -1173,7 +1173,9 @@ TimerSongIterator::TimerSongIterator(int delta)
|
||||
|
||||
int TimerSongIterator::nextCommand(byte *buf, int *result) {
|
||||
if (_delta) {
|
||||
return _delta;
|
||||
int d = _delta;
|
||||
_delta = 0;
|
||||
return d;
|
||||
}
|
||||
return SI_FINISHED;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user