diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/imuse_digi/dimuse.h | 1 | ||||
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_music.cpp | 26 | ||||
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_track.cpp | 16 |
3 files changed, 11 insertions, 32 deletions
diff --git a/engines/scumm/imuse_digi/dimuse.h b/engines/scumm/imuse_digi/dimuse.h index 6f37f7258c..372bfb7ab4 100644 --- a/engines/scumm/imuse_digi/dimuse.h +++ b/engines/scumm/imuse_digi/dimuse.h @@ -149,7 +149,6 @@ private: int getSoundIdByName(const char *soundName); void fadeOutMusic(int fadeDelay); - void updateMusicFadeTrack(int fadeDelay); Track *cloneToFadeOutTrack(Track *track, int fadeDelay); void setFtMusicState(int stateId); diff --git a/engines/scumm/imuse_digi/dimuse_music.cpp b/engines/scumm/imuse_digi/dimuse_music.cpp index 0e99bc8012..82cd382720 100644 --- a/engines/scumm/imuse_digi/dimuse_music.cpp +++ b/engines/scumm/imuse_digi/dimuse_music.cpp @@ -167,10 +167,8 @@ void IMuseDigital::playDigMusic(const char *songName, const imuseDigTable *table } } - fadeOutMusic(120); - if (!songName) - updateMusicFadeTrack(120); + fadeOutMusic(120); switch (table->transitionType) { case 0: @@ -179,17 +177,17 @@ void IMuseDigital::playDigMusic(const char *songName, const imuseDigTable *table case 3: case 4: if (table->filename[0] == 0) { - updateMusicFadeTrack(60); + fadeOutMusic(60);; return; } if (table->transitionType == 4) _stopingSequence = true; if ((!sequence) && (table->attribPos != 0) && (table->attribPos == _digStateMusicTable[_curMusicState].attribPos)) { - updateMusicFadeTrack(108); + fadeOutMusic(108); startMusic(table->filename, table->soundId, 0, 127); } else { - updateMusicFadeTrack(108); + fadeOutMusic(108); startMusic(table->filename, table->soundId, hookId, 127); } break; @@ -293,10 +291,8 @@ void IMuseDigital::playComiMusic(const char *songName, const imuseComiTable *tab } } - fadeOutMusic(120); - if (!songName) - updateMusicFadeTrack(120); + fadeOutMusic(120); switch (table->transitionType) { case 0: @@ -310,30 +306,30 @@ void IMuseDigital::playComiMusic(const char *songName, const imuseComiTable *tab break; case 2: if (table->filename[0] == 0) { - updateMusicFadeTrack(60); + fadeOutMusic(60); return; } - updateMusicFadeTrack(table->fadeOutDelay); + fadeOutMusic(table->fadeOutDelay); startMusic(table->filename, table->soundId, table->hookId, 127); break; case 3: case 4: case 12: if (table->filename[0] == 0) { - updateMusicFadeTrack(60); + fadeOutMusic(60); return; } if (table->transitionType == 4) _stopingSequence = true; if ((!sequence) && (table->attribPos != 0) && (table->attribPos == _comiStateMusicTable[_curMusicState].attribPos)) { - updateMusicFadeTrack(table->fadeOutDelay); + fadeOutMusic(table->fadeOutDelay); startMusic(table->filename, table->soundId, 0, 127); } else if (table->transitionType == 12) { - updateMusicFadeTrack(table->fadeOutDelay); + fadeOutMusic(table->fadeOutDelay); startMusic(table->filename, table->soundId, table->hookId, 127); } else { - updateMusicFadeTrack(table->fadeOutDelay); + fadeOutMusic(table->fadeOutDelay); startMusic(table->filename, table->soundId, hookId, 127); } break; diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp index e049b09427..b2037d83fc 100644 --- a/engines/scumm/imuse_digi/dimuse_track.cpp +++ b/engines/scumm/imuse_digi/dimuse_track.cpp @@ -280,22 +280,6 @@ void IMuseDigital::fadeOutMusic(int fadeDelay) { } } -void IMuseDigital::updateMusicFadeTrack(int fadeDelay) { - Common::StackLock lock(_mutex, "IMuseDigital::updateMusicFadeTrack()"); - debug(5, "IMuseDigital::updateMusicFadeTrack"); - - for (int l = MAX_DIGITAL_TRACKS; l < MAX_DIGITAL_TRACKS + MAX_DIGITAL_FADETRACKS; l++) { - Track *track = _track[l]; - if (track->used && !track->toBeRemoved && (track->volGroupId == IMUSE_VOLGRP_MUSIC)) { - track->volFadeDelay = fadeDelay; - track->volFadeDest = 0; - track->volFadeStep = (track->volFadeDest - track->vol) * 60 * (1000 / _callbackFps) / (1000 * fadeDelay); - track->volFadeUsed = true; - } - } -} - - IMuseDigital::Track *IMuseDigital::cloneToFadeOutTrack(Track *track, int fadeDelay) { assert(track); Track *fadeTrack = 0; |