aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-07-26 03:00:49 -0700
committerChris Robinson <[email protected]>2014-07-26 03:00:49 -0700
commit531c0d8e6b3d0ad8ff4ad8278a1030785deb3d77 (patch)
treed0d7085526edb0f31bf4986cbc4dd64d0f5ceee8 /OpenAL32
parenta3dbe08c8b9df301dded52ad78f655c2753be56c (diff)
Explicitly pass the address of atomics and parameters that can be modified
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alAuxEffectSlot.c12
-rw-r--r--OpenAL32/alError.c4
-rw-r--r--OpenAL32/alListener.c10
-rw-r--r--OpenAL32/alSource.c54
-rw-r--r--OpenAL32/alState.c18
5 files changed, 49 insertions, 49 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index a2060f0a..96056651 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -183,7 +183,7 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param
err = InitializeEffect(device, slot, effect);
if(err != AL_NO_ERROR)
SET_ERROR_AND_GOTO(context, err, done);
- ATOMIC_STORE(context->UpdateSources, AL_TRUE);
+ ATOMIC_STORE(&context->UpdateSources, AL_TRUE);
break;
case AL_EFFECTSLOT_AUXILIARY_SEND_AUTO:
@@ -191,7 +191,7 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param
SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
slot->AuxSendAuto = value;
- ATOMIC_STORE(context->UpdateSources, AL_TRUE);
+ ATOMIC_STORE(&context->UpdateSources, AL_TRUE);
break;
default:
@@ -246,7 +246,7 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param
SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
slot->Gain = value;
- ATOMIC_STORE(slot->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&slot->NeedsUpdate, AL_TRUE);
break;
default:
@@ -485,7 +485,7 @@ ALenum InitializeEffect(ALCdevice *Device, ALeffectslot *EffectSlot, ALeffect *e
/* FIXME: This should be done asynchronously, but since the EffectState
* object was changed, it needs an update before its Process method can
* be called. */
- ATOMIC_STORE(EffectSlot->NeedsUpdate, AL_FALSE);
+ ATOMIC_STORE(&EffectSlot->NeedsUpdate, AL_FALSE);
V(EffectSlot->EffectState,update)(Device, EffectSlot);
ALCdevice_Unlock(Device);
@@ -501,7 +501,7 @@ ALenum InitializeEffect(ALCdevice *Device, ALeffectslot *EffectSlot, ALeffect *e
ALCdevice_Lock(Device);
memcpy(&EffectSlot->EffectProps, &effect->Props, sizeof(effect->Props));
ALCdevice_Unlock(Device);
- ATOMIC_STORE(EffectSlot->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&EffectSlot->NeedsUpdate, AL_TRUE);
}
}
@@ -522,7 +522,7 @@ ALenum InitEffectSlot(ALeffectslot *slot)
slot->Gain = 1.0;
slot->AuxSendAuto = AL_TRUE;
- ATOMIC_STORE_UNSAFE(slot->NeedsUpdate, AL_FALSE);
+ ATOMIC_STORE_UNSAFE(&slot->NeedsUpdate, AL_FALSE);
for(c = 0;c < 1;c++)
{
for(i = 0;i < BUFFERSIZE;i++)
diff --git a/OpenAL32/alError.c b/OpenAL32/alError.c
index 6d3870fd..e43c7b45 100644
--- a/OpenAL32/alError.c
+++ b/OpenAL32/alError.c
@@ -46,7 +46,7 @@ ALvoid alSetError(ALCcontext *Context, ALenum errorCode)
raise(SIGTRAP);
#endif
}
- (void)ATOMIC_COMPARE_EXCHANGE(ALenum, Context->LastError, curerr, errorCode);
+ (void)ATOMIC_COMPARE_EXCHANGE(ALenum, &Context->LastError, &curerr, errorCode);
}
AL_API ALenum AL_APIENTRY alGetError(void)
@@ -69,7 +69,7 @@ AL_API ALenum AL_APIENTRY alGetError(void)
return AL_INVALID_OPERATION;
}
- errorCode = ATOMIC_EXCHANGE(ALenum, Context->LastError, AL_NO_ERROR);
+ errorCode = ATOMIC_EXCHANGE(ALenum, &Context->LastError, AL_NO_ERROR);
ALCcontext_DecRef(Context);
diff --git a/OpenAL32/alListener.c b/OpenAL32/alListener.c
index b98ea7c2..0baae82e 100644
--- a/OpenAL32/alListener.c
+++ b/OpenAL32/alListener.c
@@ -40,7 +40,7 @@ AL_API ALvoid AL_APIENTRY alListenerf(ALenum param, ALfloat value)
SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
context->Listener->Gain = value;
- ATOMIC_STORE(context->UpdateSources, AL_TRUE);
+ ATOMIC_STORE(&context->UpdateSources, AL_TRUE);
break;
case AL_METERS_PER_UNIT:
@@ -48,7 +48,7 @@ AL_API ALvoid AL_APIENTRY alListenerf(ALenum param, ALfloat value)
SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
context->Listener->MetersPerUnit = value;
- ATOMIC_STORE(context->UpdateSources, AL_TRUE);
+ ATOMIC_STORE(&context->UpdateSources, AL_TRUE);
break;
default:
@@ -77,7 +77,7 @@ AL_API ALvoid AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat val
context->Listener->Position[0] = value1;
context->Listener->Position[1] = value2;
context->Listener->Position[2] = value3;
- ATOMIC_STORE(context->UpdateSources, AL_TRUE);
+ ATOMIC_STORE(&context->UpdateSources, AL_TRUE);
UnlockContext(context);
break;
@@ -89,7 +89,7 @@ AL_API ALvoid AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat val
context->Listener->Velocity[0] = value1;
context->Listener->Velocity[1] = value2;
context->Listener->Velocity[2] = value3;
- ATOMIC_STORE(context->UpdateSources, AL_TRUE);
+ ATOMIC_STORE(&context->UpdateSources, AL_TRUE);
UnlockContext(context);
break;
@@ -142,7 +142,7 @@ AL_API ALvoid AL_APIENTRY alListenerfv(ALenum param, const ALfloat *values)
context->Listener->Up[0] = values[3];
context->Listener->Up[1] = values[4];
context->Listener->Up[2] = values[5];
- ATOMIC_STORE(context->UpdateSources, AL_TRUE);
+ ATOMIC_STORE(&context->UpdateSources, AL_TRUE);
UnlockContext(context);
break;
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index a0a7e504..d7859eff 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -375,98 +375,98 @@ static ALboolean SetSourcefv(ALsource *Source, ALCcontext *Context, SrcFloatProp
CHECKVAL(*values >= 0.0f);
Source->Pitch = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_CONE_INNER_ANGLE:
CHECKVAL(*values >= 0.0f && *values <= 360.0f);
Source->InnerAngle = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_CONE_OUTER_ANGLE:
CHECKVAL(*values >= 0.0f && *values <= 360.0f);
Source->OuterAngle = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_GAIN:
CHECKVAL(*values >= 0.0f);
Source->Gain = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_MAX_DISTANCE:
CHECKVAL(*values >= 0.0f);
Source->MaxDistance = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_ROLLOFF_FACTOR:
CHECKVAL(*values >= 0.0f);
Source->RollOffFactor = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_REFERENCE_DISTANCE:
CHECKVAL(*values >= 0.0f);
Source->RefDistance = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_MIN_GAIN:
CHECKVAL(*values >= 0.0f && *values <= 1.0f);
Source->MinGain = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_MAX_GAIN:
CHECKVAL(*values >= 0.0f && *values <= 1.0f);
Source->MaxGain = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_CONE_OUTER_GAIN:
CHECKVAL(*values >= 0.0f && *values <= 1.0f);
Source->OuterGain = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_CONE_OUTER_GAINHF:
CHECKVAL(*values >= 0.0f && *values <= 1.0f);
Source->OuterGainHF = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_AIR_ABSORPTION_FACTOR:
CHECKVAL(*values >= 0.0f && *values <= 10.0f);
Source->AirAbsorptionFactor = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_ROOM_ROLLOFF_FACTOR:
CHECKVAL(*values >= 0.0f && *values <= 10.0f);
Source->RoomRolloffFactor = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_DOPPLER_FACTOR:
CHECKVAL(*values >= 0.0f && *values <= 1.0f);
Source->DopplerFactor = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_SEC_OFFSET:
@@ -505,7 +505,7 @@ static ALboolean SetSourcefv(ALsource *Source, ALCcontext *Context, SrcFloatProp
Source->Position[1] = values[1];
Source->Position[2] = values[2];
UnlockContext(Context);
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_VELOCITY:
@@ -516,7 +516,7 @@ static ALboolean SetSourcefv(ALsource *Source, ALCcontext *Context, SrcFloatProp
Source->Velocity[1] = values[1];
Source->Velocity[2] = values[2];
UnlockContext(Context);
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_DIRECTION:
@@ -527,7 +527,7 @@ static ALboolean SetSourcefv(ALsource *Source, ALCcontext *Context, SrcFloatProp
Source->Orientation[1] = values[1];
Source->Orientation[2] = values[2];
UnlockContext(Context);
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
@@ -574,7 +574,7 @@ static ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SrcIntProp p
CHECKVAL(*values == AL_FALSE || *values == AL_TRUE);
Source->HeadRelative = (ALboolean)*values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_LOOPING:
@@ -692,35 +692,35 @@ static ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SrcIntProp p
Source->Direct.LFReference = filter->LFReference;
}
UnlockContext(Context);
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_DIRECT_FILTER_GAINHF_AUTO:
CHECKVAL(*values == AL_FALSE || *values == AL_TRUE);
Source->DryGainHFAuto = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_AUXILIARY_SEND_FILTER_GAIN_AUTO:
CHECKVAL(*values == AL_FALSE || *values == AL_TRUE);
Source->WetGainAuto = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO:
CHECKVAL(*values == AL_FALSE || *values == AL_TRUE);
Source->WetGainHFAuto = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_DIRECT_CHANNELS_SOFT:
CHECKVAL(*values == AL_FALSE || *values == AL_TRUE);
Source->DirectChannels = *values;
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
case AL_DISTANCE_MODEL:
@@ -734,7 +734,7 @@ static ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SrcIntProp p
Source->DistanceModel = *values;
if(Context->SourceDistanceModel)
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
@@ -771,7 +771,7 @@ static ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SrcIntProp p
Source->Send[values[1]].LFReference = filter->LFReference;
}
UnlockContext(Context);
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
return AL_TRUE;
@@ -2435,7 +2435,7 @@ static ALvoid InitSourceParams(ALsource *Source)
Source->Send[i].LFReference = HIGHPASSFREQREF;
}
- ATOMIC_STORE_UNSAFE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE_UNSAFE(&Source->NeedsUpdate, AL_TRUE);
}
@@ -2530,7 +2530,7 @@ ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state)
src->Send[i].Moving = AL_FALSE;
}
}
- ATOMIC_STORE(Source->NeedsUpdate, AL_TRUE);
+ ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
}
else if(state == AL_PAUSED)
{
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c
index 6e6ca544..d48c268b 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;
- ATOMIC_STORE(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;
- ATOMIC_STORE(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;
- ATOMIC_STORE(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;
- ATOMIC_STORE(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;
- ATOMIC_STORE(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)
- ATOMIC_STORE(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 = ATOMIC_EXCHANGE(ALenum, 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(ATOMIC_EXCHANGE(ALenum, source->NeedsUpdate, AL_FALSE) || UpdateSources)
+ if(ATOMIC_EXCHANGE(ALenum, &source->NeedsUpdate, AL_FALSE) || UpdateSources)
(*src)->Update(*src, context);
src++;
@@ -752,7 +752,7 @@ AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void)
slot_end = VECTOR_ITER_END(context->ActiveAuxSlots);
while(slot != slot_end)
{
- if(ATOMIC_EXCHANGE(ALenum, (*slot)->NeedsUpdate, AL_FALSE))
+ if(ATOMIC_EXCHANGE(ALenum, &(*slot)->NeedsUpdate, AL_FALSE))
V((*slot)->EffectState,update)(context->Device, *slot);
slot++;
}