aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-26 11:43:14 +0000
committerMartin Kiewitz2010-06-26 11:43:14 +0000
commitbe75870100e7e411b35f70cd96a851d7e50c20da (patch)
treef78f4eb98cda063881b30e35a3e06ed222926287
parent8eb206b6b97d172617902f92ea241af89dd22b5f (diff)
downloadscummvm-rg350-be75870100e7e411b35f70cd96a851d7e50c20da.tar.gz
scummvm-rg350-be75870100e7e411b35f70cd96a851d7e50c20da.tar.bz2
scummvm-rg350-be75870100e7e411b35f70cd96a851d7e50c20da.zip
SCI: fixing deadlock possiblity on samples (sq3 deadlocked on door opening/where am i on me)
svn-id: r50315
-rw-r--r--engines/sci/sound/music.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h
index a29b6edee2..ec9cbd8506 100644
--- a/engines/sci/sound/music.h
+++ b/engines/sci/sound/music.h
@@ -164,11 +164,13 @@ public:
uint32 soundGetTempo() const { return _dwTempo; }
bool soundIsActive(MusicEntry *pSnd) {
+ Common::StackLock lock(_mutex);
assert(pSnd->pStreamAud != 0);
return _pMixer->isSoundHandleActive(pSnd->hCurrentAud);
}
void updateAudioStreamTicker(MusicEntry *pSnd) {
+ Common::StackLock lock(_mutex);
assert(pSnd->pStreamAud != 0);
pSnd->ticker = (uint16)(_pMixer->getSoundElapsedTime(pSnd->hCurrentAud) * 0.06);
}