aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-01-27 08:16:47 -0800
committerChris Robinson <[email protected]>2016-01-27 08:16:47 -0800
commit2fa3ae85c9a4050eab3a4f140fb6accd0a02ce85 (patch)
tree1aeb9e34ba5a5081de853f84a9d03159ef48fd00 /Alc/ALu.c
parentfd387beda183c2c443ec45f7193f81cf82ede164 (diff)
Pass a pointer to the input samples array for effect processing
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 6a500833..2f1cdd85 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -1473,19 +1473,25 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
}
/* effect slot processing */
-#define PROCESS_SLOT(iter) V((*iter)->EffectState,process)( \
- SamplesToDo, (*iter)->WetBuffer[0], device->DryBuffer, device->NumChannels \
-);
- VECTOR_FOR_EACH(ALeffectslot*, ctx->ActiveAuxSlots, PROCESS_SLOT);
-#undef PROCESS_SLOT
+ c = VECTOR_SIZE(ctx->ActiveAuxSlots);
+ for(i = 0;i < c;i++)
+ {
+ const ALeffectslot *slot = VECTOR_ELEM(ctx->ActiveAuxSlots, i);
+ ALeffectState *state = slot->EffectState;
+ V(state,process)(SamplesToDo, slot->WetBuffer, device->DryBuffer,
+ device->NumChannels);
+ }
ctx = ctx->next;
}
- if((slot=device->DefaultSlot) != NULL)
- V(slot->EffectState,process)(
- SamplesToDo, slot->WetBuffer[0], device->DryBuffer, device->NumChannels
- );
+ if(device->DefaultSlot != NULL)
+ {
+ const ALeffectslot *slot = device->DefaultSlot;
+ ALeffectState *state = slot->EffectState;
+ V(state,process)(SamplesToDo, slot->WetBuffer, device->DryBuffer,
+ device->NumChannels);
+ }
/* Increment the clock time. Every second's worth of samples is
* converted and added to clock base so that large sample counts don't