aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c1
-rw-r--r--Alc/ALu.c8
2 files changed, 6 insertions, 3 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 15614dd1..b95c90f8 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1611,6 +1611,7 @@ void ALCcontext_ProcessUpdates(ALCcontext *context)
althrd_yield();
UpdateListenerProps(context);
+ UpdateAllEffectSlotProps(context);
LockUIntMapRead(&context->SourceMap);
V0(device->Backend,lock)();
diff --git a/Alc/ALu.c b/Alc/ALu.c
index d2aa381c..eafb082c 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -295,14 +295,14 @@ static ALboolean CalcListenerParams(ALCcontext *Context)
return AL_TRUE;
}
-static void CalcEffectSlotParams(ALeffectslot *slot, ALCdevice *device)
+static ALboolean CalcEffectSlotParams(ALeffectslot *slot, ALCdevice *device)
{
struct ALeffectslotProps *first;
struct ALeffectslotProps *props;
ALeffectState *state;
props = ATOMIC_EXCHANGE(struct ALeffectslotProps*, &slot->Update, NULL, almemory_order_acq_rel);
- if(!props) return;
+ if(!props) return AL_FALSE;
slot->Params.Gain = ATOMIC_LOAD(&props->Gain, almemory_order_relaxed);
slot->Params.AuxSendAuto = ATOMIC_LOAD(&props->AuxSendAuto, almemory_order_relaxed);
@@ -339,6 +339,8 @@ static void CalcEffectSlotParams(ALeffectslot *slot, ALCdevice *device)
ATOMIC_STORE(&props->next, first, almemory_order_relaxed);
} while(ATOMIC_COMPARE_EXCHANGE_WEAK(struct ALeffectslotProps*,
&slot->FreeList, &first, props) == 0);
+
+ return AL_TRUE;
}
@@ -1339,7 +1341,7 @@ static void UpdateContextSources(ALCcontext *ctx, ALeffectslot *slot)
ALboolean force = CalcListenerParams(ctx);
while(slot)
{
- CalcEffectSlotParams(slot, ctx->Device);
+ force |= CalcEffectSlotParams(slot, ctx->Device);
slot = ATOMIC_LOAD(&slot->next, almemory_order_relaxed);
}