diff options
author | Chris Robinson <[email protected]> | 2013-05-20 00:02:47 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-05-20 00:02:47 -0700 |
commit | 6aa722808e63877a34736c75eea46c5696a0fc0e (patch) | |
tree | 5dfc35f9becc1eff72f38e2ce38dcd22dacf754b /Alc/alcDistortion.c | |
parent | c693e649e67b14d508a08a4a8cde191daa4596b0 (diff) |
Clear all the old channel gains to 0 before setting them
Diffstat (limited to 'Alc/alcDistortion.c')
-rw-r--r-- | Alc/alcDistortion.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Alc/alcDistortion.c b/Alc/alcDistortion.c index 0d8f9ce5..59ccca73 100644 --- a/Alc/alcDistortion.c +++ b/Alc/alcDistortion.c @@ -91,7 +91,9 @@ static ALvoid DistortionUpdate(ALeffectState *effect, ALCdevice *Device, const A ALfloat cutoff; ALfloat edge; - for(it = 0; it < Device->NumChan; it++) + for(it = 0;it < MaxChannels;it++) + state->Gain[it] = 0.0f; + for(it = 0;it < Device->NumChan;it++) { enum Channel chan = Device->Speaker2Chan[it]; state->Gain[chan] = gain; |