diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp index db5ec9dafe8..fa50eca604e 100644 --- a/engines/scumm/imuse_digi/dimuse.cpp +++ b/engines/scumm/imuse_digi/dimuse.cpp @@ -97,7 +97,7 @@ void IMuseDigital::resetState() { _curMusicCue = 0; memset(_attributes, 0, sizeof(_attributes)); _nextSeqToPlay = 0; - _stopingSequence = false; + _stopingSequence = 0; _triggerUsed = false; } diff --git a/engines/scumm/imuse_digi/dimuse.h b/engines/scumm/imuse_digi/dimuse.h index 9c0fa51e75b..8cb6562bd3a 100644 --- a/engines/scumm/imuse_digi/dimuse.h +++ b/engines/scumm/imuse_digi/dimuse.h @@ -84,7 +84,7 @@ private: int32 _curMusicState; // current or previous id of music int32 _curMusicSeq; // current or previous id of sequence music int32 _curMusicCue; // current cue for current music. used in FT - bool _stopingSequence; + int _stopingSequence; int32 makeMixerFlags(int32 flags); static void timer_handler(void *refConf); diff --git a/engines/scumm/imuse_digi/dimuse_music.cpp b/engines/scumm/imuse_digi/dimuse_music.cpp index f0e34ab1152..238ba2c5916 100644 --- a/engines/scumm/imuse_digi/dimuse_music.cpp +++ b/engines/scumm/imuse_digi/dimuse_music.cpp @@ -184,7 +184,7 @@ void IMuseDigital::playDigMusic(const char *songName, const imuseDigTable *table return; } if (table->transitionType == 4) - _stopingSequence = true; + _stopingSequence = 1; if ((!sequence) && (table->attribPos != 0) && (table->attribPos == _digStateMusicTable[_curMusicState].attribPos)) { fadeOutMusicAndStartNew(108, table->filename, table->soundId); @@ -194,7 +194,7 @@ void IMuseDigital::playDigMusic(const char *songName, const imuseDigTable *table } break; case 6: - _stopingSequence = true; + _stopingSequence = 1; break; } } @@ -305,7 +305,7 @@ void IMuseDigital::playComiMusic(const char *songName, const imuseComiTable *tab setHookIdForMusic(table->hookId); break; case 9: - _stopingSequence = true; + _stopingSequence = 1; setHookIdForMusic(table->hookId); break; case 2: @@ -319,7 +319,7 @@ void IMuseDigital::playComiMusic(const char *songName, const imuseComiTable *tab if (getCurMusicSoundId() == table->soundId) return; if (table->transitionType == 4) - _stopingSequence = true; + _stopingSequence = 1; if (table->transitionType == 2) { fadeOutMusic(table->fadeOutDelay); startMusic(table->filename, table->soundId, table->hookId, 127); diff --git a/engines/scumm/imuse_digi/dimuse_script.cpp b/engines/scumm/imuse_digi/dimuse_script.cpp index 2f70580c205..3f4bd5504af 100644 --- a/engines/scumm/imuse_digi/dimuse_script.cpp +++ b/engines/scumm/imuse_digi/dimuse_script.cpp @@ -210,9 +210,11 @@ void IMuseDigital::refreshScripts() { if (_stopingSequence) { debug(5, "refreshScripts() Force restore music state"); - // disabled that, it seems help for fix bug #1757010 - //parseScriptCmds(0x1001, 0, 0, 0, 0, 0, 0, 0); - _stopingSequence = false; + // small delay, it seems help for fix bug #1757010 + if (_stopingSequence++ > 120) { + parseScriptCmds(0x1001, 0, 0, 0, 0, 0, 0, 0); + _stopingSequence = 0; + } } bool found = false;