aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/distortion.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-11-04 03:33:35 -0800
committerChris Robinson <[email protected]>2014-11-04 03:33:35 -0800
commit6083a684d1cad2ea97ce966b7b2ca011d1f37fe1 (patch)
tree2f419e5de632b2caadd7bed1b934f4afdd96c902 /Alc/effects/distortion.c
parentd8cfdb3f348b3e4dd545a5ebd7f282aa2b4ee585 (diff)
Use a method to set omni-directional channel gains
Diffstat (limited to 'Alc/effects/distortion.c')
-rw-r--r--Alc/effects/distortion.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Alc/effects/distortion.c b/Alc/effects/distortion.c
index 9e36ea20..95e76ac1 100644
--- a/Alc/effects/distortion.c
+++ b/Alc/effects/distortion.c
@@ -58,7 +58,6 @@ static ALvoid ALdistortionState_update(ALdistortionState *state, ALCdevice *Devi
ALfloat bandwidth;
ALfloat cutoff;
ALfloat edge;
- ALfloat gain;
/* Store distorted signal attenuation settings */
state->attenuation = Slot->EffectProps.Distortion.Gain;
@@ -82,8 +81,7 @@ static ALvoid ALdistortionState_update(ALdistortionState *state, ALCdevice *Devi
ALfilterState_setParams(&state->bandpass, ALfilterType_BandPass, 1.0f,
cutoff / (frequency*4.0f), bandwidth);
- gain = 1.0f/Device->NumSpeakers * Slot->Gain;
- SetGains(Device, gain, state->Gain);
+ ComputeAmbientGains(Device, Slot->Gain, state->Gain);
}
static ALvoid ALdistortionState_process(ALdistortionState *state, ALuint SamplesToDo, const ALfloat *restrict SamplesIn, ALfloat (*restrict SamplesOut)[BUFFERSIZE])