aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2015-10-24 16:31:28 -0700
committerChris Robinson <[email protected]>2015-10-24 16:31:28 -0700
commita57fe89050a1cf909021f2f94e6d96e44e96aa89 (patch)
tree3615f605ece6b91baa5c5ff701ae047eb81c5441 /Alc
parent298fdb220d2fe13b2c12d842ad40f39d9cf70e51 (diff)
Lock the source queue for writing when updating the playback offset
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c4
1 files changed, 2 insertions, 2 deletions
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;