diff options
author | Chris Robinson <[email protected]> | 2013-10-03 05:02:16 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-10-03 05:02:16 -0700 |
commit | 764ea95781486f86c7be956e84cf97ab893ac07b (patch) | |
tree | a6fc6b17121a2f4cab499b97a59378470fb3cb75 /Alc/effects/equalizer.c | |
parent | 99fa5911bc9f427c96fe800f94d31e4942805fd2 (diff) |
Use helpers to set channel gain arrays
Also avoid unnecessary clearing.
Diffstat (limited to 'Alc/effects/equalizer.c')
-rw-r--r-- | Alc/effects/equalizer.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Alc/effects/equalizer.c b/Alc/effects/equalizer.c index fd79462f..3fd0b0f7 100644 --- a/Alc/effects/equalizer.c +++ b/Alc/effects/equalizer.c @@ -104,15 +104,8 @@ static ALvoid ALequalizerState_update(ALequalizerState *state, ALCdevice *device { ALfloat frequency = (ALfloat)device->Frequency; 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]; - state->Gain[chan] = gain; - } + SetGains(device, gain, state->Gain); /* Calculate coefficients for the each type of filter */ ALfilterState_setParams(&state->filter[0], ALfilterType_LowShelf, |