[Scummvm-cvs-logs] scummvm master -> 862f12c71b94346a8653d2eba5b6fc0a0d59a782

wjp wjp at usecode.org
Fri Jul 8 22:09:26 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
862f12c71b SCI: Set isSample when starting digital sample from soundInitSnd


Commit: 862f12c71b94346a8653d2eba5b6fc0a0d59a782
    https://github.com/scummvm/scummvm/commit/862f12c71b94346a8653d2eba5b6fc0a0d59a782
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2016-07-08T22:08:53+02:00

Commit Message:
SCI: Set isSample when starting digital sample from soundInitSnd

This fixes digital samples in at least QfG1, SQ3, LSL5. Bug #7159.

Changed paths:
    engines/sci/sound/music.cpp



diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 3f34ecc..487d30e 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();






More information about the Scummvm-git-logs mailing list