From 2a7285ea77683ab1ca317d22293e2b63da25e5ce Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 22 Jan 2004 06:13:31 +0000 Subject: [PATCH] lock in RageSound::Update --- stepmania/src/RageSound.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index 015a9d9a5b..b1288e8a77 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -225,7 +225,9 @@ void RageSound::SetLengthSeconds(float secs) * we read data; the sound thread will always read more if it's needed. */ void RageSound::Update(float delta) { - if(playing && delta) + LockMut(SOUNDMAN->lock); + + if( playing && delta ) FillBuf(int(delta * GetSampleRate() * samplesize)); }