aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/autowah.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/effects/autowah.c')
-rw-r--r--Alc/effects/autowah.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/effects/autowah.c b/Alc/effects/autowah.c
index 8caf1fcc..6f16743d 100644
--- a/Alc/effects/autowah.c
+++ b/Alc/effects/autowah.c
@@ -78,7 +78,7 @@ static ALvoid ALautowahState_update(ALautowahState *state, ALCdevice *device, co
ComputeAmbientGains(device, slot->Gain, state->Gain);
}
-static ALvoid ALautowahState_process(ALautowahState *state, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[BUFFERSIZE])
+static ALvoid ALautowahState_process(ALautowahState *state, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[BUFFERSIZE], ALuint NumChannels)
{
ALuint it, kt;
ALuint base;
@@ -135,10 +135,10 @@ static ALvoid ALautowahState_process(ALautowahState *state, ALuint SamplesToDo,
}
state->GainCtrl = gain;
- 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++)