diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 2 | ||||
-rw-r--r-- | Alc/mixer.c | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -1301,7 +1301,7 @@ static void CalcSourceParams(ALvoice *voice, ALCcontext *context, ALboolean forc CalcNonAttnSourceParams(voice, voice->Props, buffer, context); break; } - BufferListItem = BufferListItem->next; + BufferListItem = ATOMIC_LOAD(&BufferListItem->next, almemory_order_acquire); } } diff --git a/Alc/mixer.c b/Alc/mixer.c index 8996499d..a2a56dbc 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -414,7 +414,7 @@ ALboolean MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALsizei SrcDataSize += DataSize; } } - tmpiter = tmpiter->next; + tmpiter = ATOMIC_LOAD(&tmpiter->next, almemory_order_acquire); if(!tmpiter && BufferLoopItem) tmpiter = BufferLoopItem; else if(!tmpiter) @@ -612,9 +612,11 @@ ALboolean MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALsizei if(DataSize > DataPosInt) break; - if(!(BufferListItem=BufferListItem->next)) + BufferListItem = ATOMIC_LOAD(&BufferListItem->next, almemory_order_acquire); + if(!BufferListItem) { - if(!(BufferListItem=BufferLoopItem)) + BufferListItem = BufferLoopItem; + if(!BufferListItem) { isplaying = false; DataPosInt = 0; |