diff options
author | Paweł Kołodziejski | 2008-01-20 17:02:28 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2008-01-20 17:02:28 +0000 |
commit | 77838d91e65ddeccd53ce93d9d37632123a4d174 (patch) | |
tree | 065740b8af4c8af987f6cb82fcb97aa289885b89 /engines/scumm/imuse_digi/dimuse_track.cpp | |
parent | eafc9f58f2c58452e64cdd28d12fdba326514b93 (diff) | |
download | scummvm-rg350-77838d91e65ddeccd53ce93d9d37632123a4d174.tar.gz scummvm-rg350-77838d91e65ddeccd53ce93d9d37632123a4d174.tar.bz2 scummvm-rg350-77838d91e65ddeccd53ce93d9d37632123a4d174.zip |
fix/workaround for bug #1624464, as we do not support game playing on two different CDs
svn-id: r30588
Diffstat (limited to 'engines/scumm/imuse_digi/dimuse_track.cpp')
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_track.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp index 1729cadf87..111f3acbde 100644 --- a/engines/scumm/imuse_digi/dimuse_track.cpp +++ b/engines/scumm/imuse_digi/dimuse_track.cpp @@ -116,8 +116,12 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, } else { strcpy(track->soundName, soundName); track->soundDesc = _sound->openSound(soundId, soundName, soundType, volGroupId, -1); + if (!track->soundDesc) + track->soundDesc = _sound->openSound(soundId, soundName, soundType, volGroupId, 1); + if (!track->soundDesc) + track->soundDesc = _sound->openSound(soundId, soundName, soundType, volGroupId, 2); - if (track->soundDesc == NULL) + if (!track->soundDesc) return; track->sndDataExtComp = _sound->isSndDataExtComp(track->soundDesc); @@ -353,7 +357,13 @@ Track *IMuseDigital::cloneToFadeOutTrack(Track *track, int fadeDelay) { // Clone the sound. // leaving bug number for now #1635361 - track->soundDesc = _sound->cloneSound(track->soundDesc); + ImuseDigiSndMgr::SoundDesc *soundDesc = _sound->cloneSound(track->soundDesc); + if (!soundDesc) { + // it fail load open old song after switch to diffrent CDs + // so gave up + error("Game not supported while playing on 2 diffrent CDs"); + } + track->soundDesc = soundDesc; // Set the volume fading parameters to indicate a fade out fadeTrack->volFadeDelay = fadeDelay; |