diff options
author | Chris Robinson <[email protected]> | 2014-11-04 03:33:35 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-11-04 03:33:35 -0800 |
commit | 6083a684d1cad2ea97ce966b7b2ca011d1f37fe1 (patch) | |
tree | 2f419e5de632b2caadd7bed1b934f4afdd96c902 /Alc/effects/compressor.c | |
parent | d8cfdb3f348b3e4dd545a5ebd7f282aa2b4ee585 (diff) |
Use a method to set omni-directional channel gains
Diffstat (limited to 'Alc/effects/compressor.c')
-rw-r--r-- | Alc/effects/compressor.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Alc/effects/compressor.c b/Alc/effects/compressor.c index 9554a0f2..bc1cb81a 100644 --- a/Alc/effects/compressor.c +++ b/Alc/effects/compressor.c @@ -55,14 +55,11 @@ static ALboolean ALcompressorState_deviceUpdate(ALcompressorState *state, ALCdev return AL_TRUE; } -static ALvoid ALcompressorState_update(ALcompressorState *state, ALCdevice *Device, const ALeffectslot *Slot) +static ALvoid ALcompressorState_update(ALcompressorState *state, ALCdevice *device, const ALeffectslot *slot) { - ALfloat gain; + state->Enabled = slot->EffectProps.Compressor.OnOff; - state->Enabled = Slot->EffectProps.Compressor.OnOff; - - gain = 1.0f/Device->NumSpeakers * Slot->Gain; - SetGains(Device, gain, state->Gain); + ComputeAmbientGains(device, slot->Gain, state->Gain); } static ALvoid ALcompressorState_process(ALcompressorState *state, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[BUFFERSIZE]) |