summaryrefslogtreecommitdiffstats
path: root/OpenAL32/alState.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alState.c')
-rw-r--r--OpenAL32/alState.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c
index 8e4c4671..7e73f407 100644
--- a/OpenAL32/alState.c
+++ b/OpenAL32/alState.c
@@ -604,22 +604,17 @@ AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void)
continue;
}
- if((*src)->NeedsUpdate || UpdateSources)
- {
- (*src)->NeedsUpdate = AL_FALSE;
+ if(Exchange_ALenum(&(*src)->NeedsUpdate, AL_FALSE) || UpdateSources)
ALsource_Update(*src, Context);
- }
+
src++;
}
for(e = 0;e < Context->EffectSlotMap.size;e++)
{
ALEffectSlot = Context->EffectSlotMap.array[e].value;
- if(ALEffectSlot->NeedsUpdate)
- {
- ALEffectSlot->NeedsUpdate = AL_FALSE;
+ if(Exchange_ALenum(&ALEffectSlot->NeedsUpdate, AL_FALSE))
ALEffect_Update(ALEffectSlot->EffectState, Context, ALEffectSlot);
- }
}
}