diff options
author | Filippos Karapetis | 2010-01-27 16:04:46 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-01-27 16:04:46 +0000 |
commit | 1ddcd178c206889f051bc07ae7fd8d4ef9368233 (patch) | |
tree | b09bda6ef383f9b234ee00f7ec0c24f9696dade2 /engines/sci/sound/music.cpp | |
parent | 0f0e123e5ab5bb49cc6842800edf96b527128710 (diff) | |
download | scummvm-rg350-1ddcd178c206889f051bc07ae7fd8d4ef9368233.tar.gz scummvm-rg350-1ddcd178c206889f051bc07ae7fd8d4ef9368233.tar.bz2 scummvm-rg350-1ddcd178c206889f051bc07ae7fd8d4ef9368233.zip |
The two unknown fields point to the beginning and end of the sound sample
svn-id: r47601
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; |