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/distortion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Alc/effects/distortion.c') diff --git a/Alc/effects/distortion.c b/Alc/effects/distortion.c index 92eb1a6d..7a4c2f62 100644 --- a/Alc/effects/distortion.c +++ b/Alc/effects/distortion.c @@ -83,7 +83,7 @@ static ALvoid ALdistortionState_update(ALdistortionState *state, const ALCdevice cutoff / (frequency*4.0f), calc_rcpQ_from_bandwidth(cutoff / (frequency*4.0f), bandwidth) ); - ComputeAmbientGains(Device->Dry.AmbiCoeffs, Device->Dry.NumChannels, Slot->Gain, state->Gain); + ComputeAmbientGains(Device->Dry, Slot->Gain, state->Gain); } static ALvoid ALdistortionState_process(ALdistortionState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels) -- cgit v1.2.3