aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-07-16 02:41:02 -0700
committerChris Robinson <[email protected]>2011-07-16 02:41:02 -0700
commitda2429a1d0ad184abe24f61aa7e064b81026651c (patch)
tree0f11fd679964b02b318a9e556e3051c9c91b5aad /Alc/ALu.c
parent54b5f35125d1b85c3e16c292a9829e9d652d2e38 (diff)
Allow effect slots to be updated asynchronously
Updates when the slot changes effect type is still sychronous, however, to ensure a proper state for the Process method call. Fixing this would essentially require all effects to work from the same state.
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 04d894e1..dff205dd 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -1031,6 +1031,12 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
ALEffectSlot->PendingClicks[i] = 0.0f;
}
+ if(ALEffectSlot->NeedsUpdate)
+ {
+ ALEffectSlot->NeedsUpdate = AL_FALSE;
+ ALEffect_Update(ALEffectSlot->EffectState, *ctx, &ALEffectSlot->effect);
+ }
+
ALEffect_Process(ALEffectSlot->EffectState, ALEffectSlot,
SamplesToDo, ALEffectSlot->WetBuffer,
device->DryBuffer);