From 15a58eb38375247b6c57a7ceab5aa74895d638cd Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 31 Jul 2014 07:20:36 -0700 Subject: Make the source's buffer queue head and current queue item atomic --- OpenAL32/Include/alSource.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenAL32/Include') diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index 4b2ffe0b..8d74fc54 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -18,9 +18,9 @@ extern const ALsizei ResamplerPrePadding[ResamplerMax]; typedef struct ALbufferlistitem { - struct ALbuffer *buffer; - struct ALbufferlistitem *next; - struct ALbufferlistitem *prev; + struct ALbuffer *buffer; + struct ALbufferlistitem *volatile next; + struct ALbufferlistitem *volatile prev; } ALbufferlistitem; @@ -98,8 +98,8 @@ typedef struct ALsource { ALuint position_fraction; /** Source Buffer Queue info. */ - ALbufferlistitem *volatile queue; - ALbufferlistitem *volatile current_buffer; + ATOMIC(ALbufferlistitem*) queue; + ATOMIC(ALbufferlistitem*) current_buffer; RWLock queue_lock; /** Current buffer sample info. */ -- cgit v1.2.3