From a57fe89050a1cf909021f2f94e6d96e44e96aa89 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 24 Oct 2015 16:31:28 -0700 Subject: Lock the source queue for writing when updating the playback offset --- Alc/ALc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Alc/ALc.c') diff --git a/Alc/ALc.c b/Alc/ALc.c index f5e615e8..2faa84d2 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -1608,9 +1608,9 @@ void ALCcontext_ProcessUpdates(ALCcontext *context) if((Source->state == AL_PLAYING || Source->state == AL_PAUSED) && Source->Offset >= 0.0) { - ReadLock(&Source->queue_lock); + WriteLock(&Source->queue_lock); ApplyOffset(Source); - ReadUnlock(&Source->queue_lock); + WriteUnlock(&Source->queue_lock); } new_state = Source->new_state; -- cgit v1.2.3