diff options
author | Paweł Kołodziejski | 2008-01-15 00:37:37 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2008-01-15 00:37:37 +0000 |
commit | 9639666629ed4e41c4b0f84876ddf113d2525971 (patch) | |
tree | 23c094cd1b5aa0f1754103af8633088186207221 | |
parent | f433c621121e8b1d60e0f2b086f2c9313e76ab5e (diff) | |
download | scummvm-rg350-9639666629ed4e41c4b0f84876ddf113d2525971.tar.gz scummvm-rg350-9639666629ed4e41c4b0f84876ddf113d2525971.tar.bz2 scummvm-rg350-9639666629ed4e41c4b0f84876ddf113d2525971.zip |
if track sound data is compressed reset data offset to beginning of region. we need implement seek in stream anyway or drop support
svn-id: r30490
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_track.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp index aaf41fca7d..cebf104a14 100644 --- a/engines/scumm/imuse_digi/dimuse_track.cpp +++ b/engines/scumm/imuse_digi/dimuse_track.cpp @@ -155,9 +155,15 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, if (otherTrack && otherTrack->used && !otherTrack->toBeRemoved) { track->curRegion = otherTrack->curRegion; - track->regionOffset = otherTrack->regionOffset; - track->dataOffset = otherTrack->dataOffset; - track->dataMod12Bit = otherTrack->dataMod12Bit; + if (track->sndDataExtComp) { + track->dataOffset = _sound->getRegionOffset(track->soundDesc, track->curRegion); + track->regionOffset = 0; + track->dataMod12Bit = 0; + } else { + track->dataOffset = otherTrack->dataOffset; + track->regionOffset = otherTrack->regionOffset; + track->dataMod12Bit = otherTrack->dataMod12Bit; + } } track->stream = Audio::makeAppendableAudioStream(freq, makeMixerFlags(track->mixerFlags)); @@ -282,7 +288,7 @@ void IMuseDigital::fadeOutMusicAndStartNew(int fadeDelay, const char *filename, Track *track = _track[l]; if (track->used && !track->toBeRemoved && (track->volGroupId == IMUSE_VOLGRP_MUSIC)) { startMusicWithOtherPos(filename, soundId, 0, 127, track); - cloneToFadeOutTrack(track, fadeDelay); + Track *fadeTrack = cloneToFadeOutTrack(track, fadeDelay); flushTrack(track); break; } @@ -296,7 +302,7 @@ void IMuseDigital::fadeOutMusic(int fadeDelay) { for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) { Track *track = _track[l]; if (track->used && !track->toBeRemoved && (track->volGroupId == IMUSE_VOLGRP_MUSIC)) { - cloneToFadeOutTrack(track, fadeDelay); + Track *fadeTrack = cloneToFadeOutTrack(track, fadeDelay); flushTrack(track); break; } @@ -342,7 +348,7 @@ IMuseDigital::Track *IMuseDigital::cloneToFadeOutTrack(Track *track, int fadeDel fadeTrack->trackId = track->trackId + MAX_DIGITAL_TRACKS; // Clone the sound. - // leaving bug number for now #1635361 + // leaving bug number for now #1635361, we need implement seek in compressed stream fadeTrack->soundDesc = soundDesc; // Set the volume fading parameters to indicate a fade out |