aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-04-14 17:47:55 -0700
committerChris Robinson <[email protected]>2017-04-14 17:47:55 -0700
commitf94fa5d5cfb78ab5438a53b2ad17f033660103c9 (patch)
tree51e9f2b06bb77389fb6237917a2f7462402c8cab /Alc/ALu.c
parent9e60eea93b029f1c2d2e394e2352b86cd7c65d12 (diff)
Use separate atomic macros for pointers
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 4f41d012..89689fba 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -241,7 +241,7 @@ static ALboolean CalcListenerParams(ALCcontext *Context)
struct ALlistenerProps *props;
aluVector vel;
- props = ATOMIC_EXCHANGE(struct ALlistenerProps*, &Listener->Update, NULL, almemory_order_acq_rel);
+ props = ATOMIC_EXCHANGE_PTR(&Listener->Update, NULL, almemory_order_acq_rel);
if(!props) return AL_FALSE;
/* AT then UP */
@@ -291,7 +291,7 @@ static ALboolean CalcEffectSlotParams(ALeffectslot *slot, ALCdevice *device)
struct ALeffectslotProps *props;
ALeffectState *state;
- props = ATOMIC_EXCHANGE(struct ALeffectslotProps*, &slot->Update, NULL, almemory_order_acq_rel);
+ props = ATOMIC_EXCHANGE_PTR(&slot->Update, NULL, almemory_order_acq_rel);
if(!props) return AL_FALSE;
slot->Params.Gain = props->Gain;
@@ -1252,7 +1252,7 @@ static void CalcSourceParams(ALvoice *voice, ALsource *source, ALCcontext *conte
const ALbufferlistitem *BufferListItem;
struct ALsourceProps *props;
- props = ATOMIC_EXCHANGE(struct ALsourceProps*, &source->Update, NULL, almemory_order_acq_rel);
+ props = ATOMIC_EXCHANGE_PTR(&source->Update, NULL, almemory_order_acq_rel);
if(!props && !force) return;
if(props)
@@ -1607,14 +1607,14 @@ void aluHandleDisconnect(ALCdevice *device)
voice_end = voice + Context->VoiceCount;
while(voice != voice_end)
{
- ALsource *source = ATOMIC_EXCHANGE(ALsource*, &(*voice)->Source, NULL,
- almemory_order_acq_rel);
+ ALsource *source = ATOMIC_EXCHANGE_PTR(&(*voice)->Source, NULL,
+ almemory_order_acq_rel);
ATOMIC_STORE(&(*voice)->Playing, false, almemory_order_release);
if(source)
{
ALenum playing = AL_PLAYING;
- ATOMIC_COMPARE_EXCHANGE_STRONG_SEQ(ALenum, &source->state, &playing, AL_STOPPED);
+ (void)(ATOMIC_COMPARE_EXCHANGE_STRONG_SEQ(&source->state, &playing, AL_STOPPED));
}
voice++;