final fix for bug #1757010

svn-id: r30604
This commit is contained in:
Paweł Kołodziejski 2008-01-21 22:06:14 +00:00
parent 2890816046
commit fec313a1ac
4 changed files with 11 additions and 9 deletions

View File

@ -97,7 +97,7 @@ void IMuseDigital::resetState() {
_curMusicCue = 0;
memset(_attributes, 0, sizeof(_attributes));
_nextSeqToPlay = 0;
_stopingSequence = false;
_stopingSequence = 0;
_triggerUsed = false;
}

View File

@ -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);

View File

@ -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);

View File

@ -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;