aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-07-31 07:20:36 -0700
committerChris Robinson <[email protected]>2014-07-31 07:20:36 -0700
commit15a58eb38375247b6c57a7ceab5aa74895d638cd (patch)
tree5f546bab5504768356c27903a02b271c619b7d09 /Alc/ALu.c
parentcdfc5a4d31d17e156736bb8bdcaf93ea505237ac (diff)
Make the source's buffer queue head and current queue item atomic
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 81d062d8..e33a756b 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -260,7 +260,7 @@ ALvoid CalcNonAttnSourceParams(ALactivesource *src, const ALCcontext *ALContext)
/* Calculate the stepping value */
Channels = FmtMono;
- BufferListItem = ALSource->queue;
+ BufferListItem = ATOMIC_LOAD(&ALSource->queue);
while(BufferListItem != NULL)
{
ALbuffer *ALBuffer;
@@ -872,7 +872,7 @@ ALvoid CalcSourceParams(ALactivesource *src, const ALCcontext *ALContext)
clampf(SpeedOfSound-VSS, 1.0f, SpeedOfSound*2.0f - 1.0f);
}
- BufferListItem = ALSource->queue;
+ BufferListItem = ATOMIC_LOAD(&ALSource->queue);
while(BufferListItem != NULL)
{
ALbuffer *ALBuffer;
@@ -1308,7 +1308,7 @@ ALvoid aluHandleDisconnect(ALCdevice *device)
if(source->state == AL_PLAYING)
{
source->state = AL_STOPPED;
- source->current_buffer = NULL;
+ ATOMIC_STORE(&source->current_buffer, NULL);
source->position = 0;
source->position_fraction = 0;
}