diff options
Diffstat (limited to 'engines/sci/sound/music.cpp')
-rw-r--r-- | engines/sci/sound/music.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 740c3c43a5..3bb3f5e8df 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -187,7 +187,10 @@ void SciMusic::soundInitSnd(MusicEntry *pSnd) { // Amiga SCI1 games had signed sound data if (_soundVersion >= SCI_VERSION_1_EARLY && ((SciEngine *)g_engine)->getPlatform() == Common::kPlatformAmiga) flags = 0; - pSnd->pStreamAud = Audio::makeRawMemoryStream(channelData, track->digitalSampleSize, track->digitalSampleRate, flags, DisposeAfterUse::NO); + int endPart = track->digitalSampleEnd > 0 ? (track->digitalSampleSize - track->digitalSampleEnd) : 0; + pSnd->pStreamAud = Audio::makeRawMemoryStream(channelData + track->digitalSampleStart, + track->digitalSampleSize - track->digitalSampleStart - endPart, + track->digitalSampleRate, flags, DisposeAfterUse::NO); delete pSnd->pLoopStream; pSnd->pLoopStream = 0; pSnd->soundType = Audio::Mixer::kSFXSoundType; |