aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alcDistortion.c4
-rw-r--r--Alc/alcEqualizer.c2
2 files changed, 5 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;
diff --git a/Alc/alcEqualizer.c b/Alc/alcEqualizer.c
index 2067c319..dffc431a 100644
--- a/Alc/alcEqualizer.c
+++ b/Alc/alcEqualizer.c
@@ -118,6 +118,8 @@ static ALvoid EqualizerUpdate(ALeffectState *effect, ALCdevice *Device, const AL
ALfloat gain = sqrtf(1.0f / Device->NumChan) * Slot->Gain;
ALuint 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];