aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2016-07-08 21:20:19 +0200
committerWillem Jan Palenstijn2016-07-08 22:08:53 +0200
commit862f12c71b94346a8653d2eba5b6fc0a0d59a782 (patch)
treeeca09c87e160b161b0464a3d61f7270d834286aa /engines/sci/sound
parent82eea1491bbc5bd4ba8b1d1a005d0975255edccd (diff)
downloadscummvm-rg350-862f12c71b94346a8653d2eba5b6fc0a0d59a782.tar.gz
scummvm-rg350-862f12c71b94346a8653d2eba5b6fc0a0d59a782.tar.bz2
scummvm-rg350-862f12c71b94346a8653d2eba5b6fc0a0d59a782.zip
SCI: Set isSample when starting digital sample from soundInitSnd
This fixes digital samples in at least QfG1, SQ3, LSL5. Bug #7159.
Diffstat (limited to 'engines/sci/sound')
-rw-r--r--engines/sci/sound/music.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 3f34ecc2f8..487d30e840 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -354,12 +354,14 @@ void SciMusic::soundInitSnd(MusicEntry *pSnd) {
pSnd->pStreamAud = Audio::makeRawStream(channelData + track->digitalSampleStart,
track->digitalSampleSize - track->digitalSampleStart - endPart,
track->digitalSampleRate, flags, DisposeAfterUse::NO);
+ assert(pSnd->pStreamAud);
delete pSnd->pLoopStream;
pSnd->pLoopStream = 0;
pSnd->soundType = Audio::Mixer::kSFXSoundType;
pSnd->hCurrentAud = Audio::SoundHandle();
pSnd->playBed = false;
pSnd->overridePriority = false;
+ pSnd->isSample = true;
} else {
// play MIDI track
Common::StackLock lock(_mutex);
@@ -659,6 +661,7 @@ void SciMusic::soundKill(MusicEntry *pSnd) {
pSnd->pStreamAud = NULL;
delete pSnd->pLoopStream;
pSnd->pLoopStream = 0;
+ pSnd->isSample = false;
}
_mutex.lock();