diff options
author | Paweł Kołodziejski | 2008-01-13 01:03:15 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2008-01-13 01:03:15 +0000 |
commit | 94834008125a625292a905f048e64328ee4416e7 (patch) | |
tree | dbe4bce454baca4e10f30444db1c53b82d384539 /engines/scumm/imuse_digi/dimuse_track.cpp | |
parent | d27c118acc455b57ba988b0bbbb681fc36914ee9 (diff) | |
download | scummvm-rg350-94834008125a625292a905f048e64328ee4416e7.tar.gz scummvm-rg350-94834008125a625292a905f048e64328ee4416e7.tar.bz2 scummvm-rg350-94834008125a625292a905f048e64328ee4416e7.zip |
fixed fadeOutMusic in transitions
svn-id: r30465
Diffstat (limited to 'engines/scumm/imuse_digi/dimuse_track.cpp')
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_track.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp index b2037d83fc..e049b09427 100644 --- a/engines/scumm/imuse_digi/dimuse_track.cpp +++ b/engines/scumm/imuse_digi/dimuse_track.cpp @@ -280,6 +280,22 @@ 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; |