aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/compressor.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/effects/compressor.c')
-rw-r--r--Alc/effects/compressor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/effects/compressor.c b/Alc/effects/compressor.c
index ab88ecf0..f9964427 100644
--- a/Alc/effects/compressor.c
+++ b/Alc/effects/compressor.c
@@ -62,7 +62,7 @@ static ALvoid ALcompressorState_update(ALcompressorState *state, ALCdevice *devi
ComputeAmbientGains(device, slot->Gain, state->Gain);
}
-static ALvoid ALcompressorState_process(ALcompressorState *state, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[BUFFERSIZE])
+static ALvoid ALcompressorState_process(ALcompressorState *state, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[BUFFERSIZE], ALuint NumChannels)
{
ALuint it, kt;
ALuint base;
@@ -116,10 +116,10 @@ static ALvoid ALcompressorState_process(ALcompressorState *state, ALuint Samples
}
- 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++)