aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alState.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alState.c')
-rw-r--r--OpenAL32/alState.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c
index d499fcd1..59619b0d 100644
--- a/OpenAL32/alState.c
+++ b/OpenAL32/alState.c
@@ -56,7 +56,7 @@ AL_API ALvoid AL_APIENTRY alEnable(ALenum capability)
{
case AL_SOURCE_DISTANCE_MODEL:
context->SourceDistanceModel = AL_TRUE;
- context->UpdateSources = AL_TRUE;
+ ATOMIC_STORE(context->UpdateSources, AL_TRUE);
break;
default:
@@ -78,7 +78,7 @@ AL_API ALvoid AL_APIENTRY alDisable(ALenum capability)
{
case AL_SOURCE_DISTANCE_MODEL:
context->SourceDistanceModel = AL_FALSE;
- context->UpdateSources = AL_TRUE;
+ ATOMIC_STORE(context->UpdateSources, AL_TRUE);
break;
default:
@@ -643,7 +643,7 @@ AL_API ALvoid AL_APIENTRY alDopplerFactor(ALfloat value)
SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
context->DopplerFactor = value;
- context->UpdateSources = AL_TRUE;
+ ATOMIC_STORE(context->UpdateSources, AL_TRUE);
done:
ALCcontext_DecRef(context);
@@ -660,7 +660,7 @@ AL_API ALvoid AL_APIENTRY alDopplerVelocity(ALfloat value)
SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
context->DopplerVelocity = value;
- context->UpdateSources = AL_TRUE;
+ ATOMIC_STORE(context->UpdateSources, AL_TRUE);
done:
ALCcontext_DecRef(context);
@@ -677,7 +677,7 @@ AL_API ALvoid AL_APIENTRY alSpeedOfSound(ALfloat value)
SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
context->SpeedOfSound = value;
- context->UpdateSources = AL_TRUE;
+ ATOMIC_STORE(context->UpdateSources, AL_TRUE);
done:
ALCcontext_DecRef(context);
@@ -698,7 +698,7 @@ AL_API ALvoid AL_APIENTRY alDistanceModel(ALenum value)
context->DistanceModel = value;
if(!context->SourceDistanceModel)
- context->UpdateSources = AL_TRUE;
+ ATOMIC_STORE(context->UpdateSources, AL_TRUE);
done:
ALCcontext_DecRef(context);
@@ -725,7 +725,7 @@ AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void)
context->DeferUpdates = AL_TRUE;
/* Make sure all pending updates are performed */
- UpdateSources = ExchangeInt(&context->UpdateSources, AL_FALSE);
+ UpdateSources = ATOMIC_EXCHANGE(ALenum, context->UpdateSources, AL_FALSE);
src = context->ActiveSources;
src_end = src + context->ActiveSourceCount;
@@ -742,7 +742,7 @@ AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void)
continue;
}
- if(ExchangeInt(&source->NeedsUpdate, AL_FALSE) || UpdateSources)
+ if(ATOMIC_EXCHANGE(ALenum, source->NeedsUpdate, AL_FALSE) || UpdateSources)
(*src)->Update(*src, context);
src++;