Clear all the old channel gains to 0 before setting them
This commit is contained in:
parent
c693e649e6
commit
6aa722808e
@ -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;
|
||||
|
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user