aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-09 13:27:59 +0000
committerMartin Kiewitz2010-06-09 13:27:59 +0000
commit0f2e6b0f856afdfb540b681a194d001d051029f5 (patch)
tree434270afc6b4bd05903f4508a84cb337ab70b2d0 /engines
parent2c629a04dd502ff130127072e69724b2eec29c68 (diff)
downloadscummvm-rg350-0f2e6b0f856afdfb540b681a194d001d051029f5.tar.gz
scummvm-rg350-0f2e6b0f856afdfb540b681a194d001d051029f5.tar.bz2
scummvm-rg350-0f2e6b0f856afdfb540b681a194d001d051029f5.zip
SCI: fix multiple playing of the same sound in a row (without using looping) - thx to LordHoto for helping me finding this one out - fixes pharkas right at the start (hammering only played once)
svn-id: r49538
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/sound/music.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index fa5716e7cc..254c70a24f 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -317,6 +317,8 @@ void SciMusic::soundPlay(MusicEntry *pSnd) {
pSnd->pLoopStream, -1, pSnd->volume, 0,
DisposeAfterUse::NO);
} else {
+ // Rewind in case we play the same sample multiple times (non-looped) like in pharkas right at the start
+ pSnd->pStreamAud->rewind();
_pMixer->playStream(pSnd->soundType, &pSnd->hCurrentAud,
pSnd->pStreamAud, -1, pSnd->volume, 0,
DisposeAfterUse::NO);