From c2a79f0f7b1d8f9a868e3411797005cefcebafa1 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 23 Feb 2017 16:44:59 -0800 Subject: Remove CalcXYZCoeffs and inline CalcAngleCoeffs --- Alc/effects/dedicated.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Alc/effects/dedicated.c') diff --git a/Alc/effects/dedicated.c b/Alc/effects/dedicated.c index 818cbb6b..93c7416e 100644 --- a/Alc/effects/dedicated.c +++ b/Alc/effects/dedicated.c @@ -98,7 +98,7 @@ static ALvoid ALdedicatedState_update(ALdedicatedState *state, const ALCdevice * else { ALfloat coeffs[MAX_AMBI_COEFFS]; - CalcXYZCoeffs(0.0f, 0.0f, -1.0f, 0.0f, coeffs); + CalcAngleCoeffs(0.0f, 0.0f, 0.0f, coeffs); STATIC_CAST(ALeffectState,state)->OutBuffer = device->Dry.Buffer; STATIC_CAST(ALeffectState,state)->OutChannels = device->Dry.NumChannels; @@ -109,16 +109,18 @@ static ALvoid ALdedicatedState_update(ALdedicatedState *state, const ALCdevice * static ALvoid ALdedicatedState_process(ALdedicatedState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels) { - const ALfloat *gains = state->gains; ALuint i, c; + SamplesIn = ASSUME_ALIGNED(SamplesIn, 16); + SamplesOut = ASSUME_ALIGNED(SamplesOut, 16); for(c = 0;c < NumChannels;c++) { - if(!(fabsf(gains[c]) > GAIN_SILENCE_THRESHOLD)) + const ALfloat gain = state->gains[c]; + if(!(fabsf(gain) > GAIN_SILENCE_THRESHOLD)) continue; for(i = 0;i < SamplesToDo;i++) - SamplesOut[c][i] += SamplesIn[0][i] * gains[c]; + SamplesOut[c][i] += SamplesIn[0][i] * gain; } } -- cgit v1.2.3