diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 8 | ||||
-rw-r--r-- | Alc/ALu.c | 4 |
2 files changed, 6 insertions, 6 deletions
@@ -1882,7 +1882,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) { ALsizei pos; - context->UpdateSources = AL_FALSE; + ATOMIC_STORE_UNSAFE(context->UpdateSources, AL_FALSE); LockUIntMapRead(&context->EffectSlotMap); for(pos = 0;pos < context->EffectSlotMap.size;pos++) { @@ -1914,7 +1914,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) source->Send[s].GainHF = 1.0f; s++; } - source->NeedsUpdate = AL_TRUE; + ATOMIC_STORE_UNSAFE(source->NeedsUpdate, AL_TRUE); } UnlockUIntMapRead(&context->SourceMap); @@ -1931,7 +1931,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) } src->Update(src, context); - source->NeedsUpdate = AL_FALSE; + ATOMIC_STORE_UNSAFE(source->NeedsUpdate, AL_FALSE); } context = context->next; @@ -2111,7 +2111,7 @@ static ALvoid InitContext(ALCcontext *Context) //Validate Context Context->LastError = AL_NO_ERROR; - Context->UpdateSources = AL_FALSE; + ATOMIC_STORE_UNSAFE(Context->UpdateSources, AL_FALSE); Context->ActiveSourceCount = 0; InitUIntMap(&Context->SourceMap, Context->Device->MaxNoOfSources); InitUIntMap(&Context->EffectSlotMap, Context->Device->AuxiliaryEffectSlotMax); @@ -1167,7 +1167,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size) ALenum UpdateSources = AL_FALSE; if(!DeferUpdates) - UpdateSources = ExchangeInt(&ctx->UpdateSources, AL_FALSE); + UpdateSources = ATOMIC_EXCHANGE(ALenum, ctx->UpdateSources, AL_FALSE); if(UpdateSources) CalcListenerParams(ctx->Listener); @@ -1188,7 +1188,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size) continue; } - if(!DeferUpdates && (ExchangeInt(&source->NeedsUpdate, AL_FALSE) || + if(!DeferUpdates && (ATOMIC_EXCHANGE(ALenum, source->NeedsUpdate, AL_FALSE) || UpdateSources)) (*src)->Update(*src, ctx); |