diff options
author | Paweł Kołodziejski | 2004-06-21 19:37:54 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2004-06-21 19:37:54 +0000 |
commit | 5ce27765af27afebefbe0088d2fdd980e7dccc3a (patch) | |
tree | aa6d915989ef89e728d9209a720ff4e53a73941b | |
parent | 8c14139a3383a4b6581ffe434d8f80cafab1feff (diff) | |
download | scummvm-rg350-5ce27765af27afebefbe0088d2fdd980e7dccc3a.tar.gz scummvm-rg350-5ce27765af27afebefbe0088d2fdd980e7dccc3a.tar.bz2 scummvm-rg350-5ce27765af27afebefbe0088d2fdd980e7dccc3a.zip |
dont wait for end of stream while playing insane
svn-id: r13998
-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); } } |