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 | |
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')
-rw-r--r-- | engines/scumm/imuse_digi/dimuse.h | 2 | ||||
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_track.cpp | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/engines/scumm/imuse_digi/dimuse.h b/engines/scumm/imuse_digi/dimuse.h index caff9958f3..df39fd9619 100644 --- a/engines/scumm/imuse_digi/dimuse.h +++ b/engines/scumm/imuse_digi/dimuse.h @@ -137,7 +137,7 @@ private: int getSoundIdByName(const char *soundName); void fadeOutMusic(int fadeDelay); - Track *cloneToFadeOutTrack(const Track *track, int fadeDelay); + Track *cloneToFadeOutTrack(Track *track, int fadeDelay); void setFtMusicState(int stateId); void setFtMusicSequence(int seqId); 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; |