aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/equalizer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-09-19 22:18:46 -0700
committerChris Robinson <[email protected]>2018-09-19 22:18:46 -0700
commit5c6b8eda4f4defc85faf76edb2772f6b340c7c1a (patch)
treef5110aed671ade8156448b4e84613f8aa4b0185d /Alc/effects/equalizer.c
parentea95a8adef036602770546fb14bcaf713ec40b8b (diff)
Remove another duplicate function
Diffstat (limited to 'Alc/effects/equalizer.c')
-rw-r--r--Alc/effects/equalizer.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Alc/effects/equalizer.c b/Alc/effects/equalizer.c
index 8ff56fb5..17106127 100644
--- a/Alc/effects/equalizer.c
+++ b/Alc/effects/equalizer.c
@@ -76,12 +76,12 @@ typedef struct ALequalizerState {
DERIVE_FROM_TYPE(ALeffectState);
struct {
+ /* Effect parameters */
+ BiquadFilter filter[4];
+
/* Effect gains for each channel */
ALfloat CurrentGains[MAX_OUTPUT_CHANNELS];
ALfloat TargetGains[MAX_OUTPUT_CHANNELS];
-
- /* Effect parameters */
- BiquadFilter filter[4];
} Chans[MAX_EFFECT_CHANNELS];
ALfloat SampleBuffer[MAX_EFFECT_CHANNELS][BUFFERSIZE];
@@ -128,12 +128,6 @@ static ALvoid ALequalizerState_update(ALequalizerState *state, const ALCcontext
ALfloat gain, f0norm;
ALuint i;
- STATIC_CAST(ALeffectState,state)->OutBuffer = device->FOAOut.Buffer;
- STATIC_CAST(ALeffectState,state)->OutChannels = device->FOAOut.NumChannels;
- for(i = 0;i < MAX_EFFECT_CHANNELS;i++)
- ComputeFirstOrderGains(&device->FOAOut, IdentityMatrixf.m[i],
- slot->Params.Gain, state->Chans[i].TargetGains);
-
/* Calculate coefficients for the each type of filter. Note that the shelf
* filters' gain is for the reference frequency, which is the centerpoint
* of the transition band.
@@ -174,6 +168,12 @@ static ALvoid ALequalizerState_update(ALequalizerState *state, const ALCcontext
BiquadFilter_copyParams(&state->Chans[i].filter[2], &state->Chans[0].filter[2]);
BiquadFilter_copyParams(&state->Chans[i].filter[3], &state->Chans[0].filter[3]);
}
+
+ STATIC_CAST(ALeffectState,state)->OutBuffer = device->FOAOut.Buffer;
+ STATIC_CAST(ALeffectState,state)->OutChannels = device->FOAOut.NumChannels;
+ for(i = 0;i < MAX_EFFECT_CHANNELS;i++)
+ ComputePanGains(&device->FOAOut, IdentityMatrixf.m[i], slot->Params.Gain,
+ state->Chans[i].TargetGains);
}
static ALvoid ALequalizerState_process(ALequalizerState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels)