aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/flanger.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-04-15 17:31:04 -0700
committerChris Robinson <[email protected]>2016-04-15 17:31:04 -0700
commitbd65f64d0506be6f20d69311c9a6ade3d0a8d01d (patch)
tree7c4fb19c07978556b815dc666f4b90bde4003522 /Alc/effects/flanger.c
parente27fad90dec951f75b40004dcd32470ca404921d (diff)
Avoid mixing all coefficients together when only some are used
Diffstat (limited to 'Alc/effects/flanger.c')
-rw-r--r--Alc/effects/flanger.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/Alc/effects/flanger.c b/Alc/effects/flanger.c
index d29e0f25..c323c17a 100644
--- a/Alc/effects/flanger.c
+++ b/Alc/effects/flanger.c
@@ -113,11 +113,13 @@ static ALvoid ALflangerState_update(ALflangerState *state, const ALCdevice *Devi
/* Gains for left and right sides */
CalcXYZCoeffs(-1.0f, 0.0f, 0.0f, coeffs);
- ComputePanningGains(Device->Dry.AmbiCoeffs, Device->Dry.NumChannels, coeffs,
- Slot->Gain, state->Gain[0]);
+ ComputePanningGains(Device->Dry.AmbiCoeffs, Device->Dry.NumChannels,
+ Device->Dry.CoeffCount, coeffs, Slot->Gain, state->Gain[0]
+ );
CalcXYZCoeffs( 1.0f, 0.0f, 0.0f, coeffs);
- ComputePanningGains(Device->Dry.AmbiCoeffs, Device->Dry.NumChannels, coeffs,
- Slot->Gain, state->Gain[1]);
+ ComputePanningGains(Device->Dry.AmbiCoeffs, Device->Dry.NumChannels,
+ Device->Dry.CoeffCount, coeffs, Slot->Gain, state->Gain[1]
+ );
phase = Slot->EffectProps.Flanger.Phase;
rate = Slot->EffectProps.Flanger.Rate;