From a6c70992b01b168d561c448fa235a86c9697b6ef Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 15 Apr 2016 22:05:47 -0700 Subject: More directly map coefficients for ambisonic mixing buffers Instead of looping over all the coefficients for each channel with multiplies, when we know only one will have a non-0 factor for ambisonic mixing buffers, just index the one with a non-0 factor. --- Alc/effects/chorus.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'Alc/effects/chorus.c') diff --git a/Alc/effects/chorus.c b/Alc/effects/chorus.c index a55983ab..94c9fc47 100644 --- a/Alc/effects/chorus.c +++ b/Alc/effects/chorus.c @@ -113,13 +113,9 @@ static ALvoid ALchorusState_update(ALchorusState *state, const ALCdevice *Device /* Gains for left and right sides */ CalcXYZCoeffs(-1.0f, 0.0f, 0.0f, coeffs); - ComputePanningGains(Device->Dry.AmbiCoeffs, Device->Dry.NumChannels, - Device->Dry.CoeffCount, coeffs, Slot->Gain, state->Gain[0] - ); + ComputePanningGains(Device->Dry, coeffs, Slot->Gain, state->Gain[0]); CalcXYZCoeffs( 1.0f, 0.0f, 0.0f, coeffs); - ComputePanningGains(Device->Dry.AmbiCoeffs, Device->Dry.NumChannels, - Device->Dry.CoeffCount, coeffs, Slot->Gain, state->Gain[1] - ); + ComputePanningGains(Device->Dry, coeffs, Slot->Gain, state->Gain[1]); phase = Slot->EffectProps.Chorus.Phase; rate = Slot->EffectProps.Chorus.Rate; -- cgit v1.2.3