diff options
Diffstat (limited to 'Alc/effects/equalizer.c')
-rw-r--r-- | Alc/effects/equalizer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/effects/equalizer.c b/Alc/effects/equalizer.c index dc02e9b0..7caec266 100644 --- a/Alc/effects/equalizer.c +++ b/Alc/effects/equalizer.c @@ -118,7 +118,7 @@ static ALvoid ALequalizerState_update(ALequalizerState *state, ALCdevice *device 0.0f); } -static ALvoid ALequalizerState_process(ALequalizerState *state, ALuint SamplesToDo, const ALfloat *restrict SamplesIn, ALfloat (*restrict SamplesOut)[BUFFERSIZE]) +static ALvoid ALequalizerState_process(ALequalizerState *state, ALuint SamplesToDo, const ALfloat *restrict SamplesIn, ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels) { ALuint base; ALuint it; @@ -140,10 +140,10 @@ static ALvoid ALequalizerState_process(ALequalizerState *state, ALuint SamplesTo temps[it] = smp; } - for(kt = 0;kt < MAX_OUTPUT_CHANNELS;kt++) + for(kt = 0;kt < NumChannels;kt++) { ALfloat gain = state->Gain[kt]; - if(!(gain > GAIN_SILENCE_THRESHOLD)) + if(!(fabsf(gain) > GAIN_SILENCE_THRESHOLD)) continue; for(it = 0;it < td;it++) |