diff options
author | Max Horn | 2007-12-30 16:32:30 +0000 |
---|---|---|
committer | Max Horn | 2007-12-30 16:32:30 +0000 |
commit | b9a5e9ea0eae3cf61525361ebbdfac279a8f9361 (patch) | |
tree | f3f4b7212ad23188e3b6a80533707f068bd1aa0a /engines/scumm/imuse_digi/dimuse_track.cpp | |
parent | c54562d9a3fbcc6bc2249e7e36a92ead78165653 (diff) | |
download | scummvm-rg350-b9a5e9ea0eae3cf61525361ebbdfac279a8f9361.tar.gz scummvm-rg350-b9a5e9ea0eae3cf61525361ebbdfac279a8f9361.tar.bz2 scummvm-rg350-b9a5e9ea0eae3cf61525361ebbdfac279a8f9361.zip |
Fix for bug #1635361: COMI: Music fade-out broken for compressed audio
svn-id: r30081
Diffstat (limited to 'engines/scumm/imuse_digi/dimuse_track.cpp')
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_track.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp index 383c0281df..1a9d59a214 100644 --- a/engines/scumm/imuse_digi/dimuse_track.cpp +++ b/engines/scumm/imuse_digi/dimuse_track.cpp @@ -314,7 +314,7 @@ void IMuseDigital::fadeOutMusic(int fadeDelay) { } } -IMuseDigital::Track *IMuseDigital::cloneToFadeOutTrack(const Track *track, int fadeDelay) { +IMuseDigital::Track *IMuseDigital::cloneToFadeOutTrack(Track *track, int fadeDelay) { assert(track); Track *fadeTrack = 0; @@ -330,12 +330,11 @@ IMuseDigital::Track *IMuseDigital::cloneToFadeOutTrack(const Track *track, int f // Clone the settings of the given track memcpy(fadeTrack, track, sizeof(Track)); - // Clone the sound. - // According to aquadran, this is only called for bundle files and sound - // data in *.la1 from switchToNextRegion and fadeOutMusic func. Henc we - // know that track->soundDesc != NULL. - fadeTrack->soundDesc = _sound->cloneSound(track->soundDesc); + // Clone the sound. We use the original sound in the fadeTrack, + // and the cloned sound in the original track. This fixes bug #1635361. assert(fadeTrack->soundDesc); + track->soundDesc = _sound->cloneSound(fadeTrack->soundDesc); + assert(track->soundDesc); // Set the volume fading parameters to indicate a fade out fadeTrack->volFadeDelay = fadeDelay; |