diff options
-rw-r--r-- | scumm/imuse_digi/dimuse_script.cpp | 21 | ||||
-rw-r--r-- | scumm/imuse_digi/dimuse_track.cpp | 1 |
2 files changed, 12 insertions, 10 deletions
diff --git a/scumm/imuse_digi/dimuse_script.cpp b/scumm/imuse_digi/dimuse_script.cpp index ebe3d1ae84..a66024ad4c 100644 --- a/scumm/imuse_digi/dimuse_script.cpp +++ b/scumm/imuse_digi/dimuse_script.cpp @@ -164,15 +164,18 @@ void IMuseDigital::flushTracks() { for (int l = 0; l < MAX_DIGITAL_TRACKS + MAX_DIGITAL_FADETRACKS; l++) { Track *track = _track[l]; if (track->used && (track->readyToRemove || (_vm->_insaneRunning && track->toBeRemoved))) { - if ((track->stream) && (!track->stream->endOfStream())) { - track->stream->finish(); - } else if ((track->stream) && (track->stream->endOfStream())) { - _vm->_mixer->stopHandle(track->handle); - delete track->stream; - track->stream = NULL; - _sound->closeSound(track->soundHandle); - track->soundHandle = NULL; - track->used = false; + if (track->stream) { + if (!track->stream->endOfStream()) { + track->stream->finish(); + } + if (track->stream->endOfStream() || _vm->_insaneRunning) { + _vm->_mixer->stopHandle(track->handle); + delete track->stream; + track->stream = NULL; + _sound->closeSound(track->soundHandle); + track->soundHandle = NULL; + track->used = false; + } } else if (track->stream2) { _vm->_mixer->stopHandle(track->handle); delete track->stream2; diff --git a/scumm/imuse_digi/dimuse_track.cpp b/scumm/imuse_digi/dimuse_track.cpp index bbdae9d127..0b24a894a3 100644 --- a/scumm/imuse_digi/dimuse_track.cpp +++ b/scumm/imuse_digi/dimuse_track.cpp @@ -179,7 +179,6 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, track->used = true; return; } - _vm->_system->delay_msecs(50); } } |