diff options
Diffstat (limited to 'engines/scumm/imuse_digi/dimuse.cpp')
-rw-r--r-- | engines/scumm/imuse_digi/dimuse.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp index 0e1752007b..93e7e831ed 100644 --- a/engines/scumm/imuse_digi/dimuse.cpp +++ b/engines/scumm/imuse_digi/dimuse.cpp @@ -219,8 +219,8 @@ void IMuseDigital::callback() { Track *track = _track[l]; if (track->used) { // Remove tracks if necessary - if (track->toBeRemoved) { - flushTrack(track); + if (!_mixer->isSoundHandleActive(track->mixChanHandle)) { + memset(track, 0, sizeof(Track)); continue; } @@ -260,7 +260,7 @@ void IMuseDigital::callback() { if (track->curRegion == -1) { switchToNextRegion(track); - if (track->toBeRemoved) + if (track->toBeRemoved || !track->used) continue; } @@ -328,7 +328,7 @@ void IMuseDigital::callback() { if (_sound->isEndOfRegion(track->soundDesc, track->curRegion)) { switchToNextRegion(track); - if (track->toBeRemoved) + if (track->toBeRemoved || !track->used) break; } feedSize -= curFeedSize; |