aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/modulator.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-11-04 03:33:35 -0800
committerChris Robinson <[email protected]>2014-11-04 03:33:35 -0800
commit6083a684d1cad2ea97ce966b7b2ca011d1f37fe1 (patch)
tree2f419e5de632b2caadd7bed1b934f4afdd96c902 /Alc/effects/modulator.c
parentd8cfdb3f348b3e4dd545a5ebd7f282aa2b4ee585 (diff)
Use a method to set omni-directional channel gains
Diffstat (limited to 'Alc/effects/modulator.c')
-rw-r--r--Alc/effects/modulator.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Alc/effects/modulator.c b/Alc/effects/modulator.c
index e57040b3..01d19bcb 100644
--- a/Alc/effects/modulator.c
+++ b/Alc/effects/modulator.c
@@ -125,7 +125,7 @@ static ALboolean ALmodulatorState_deviceUpdate(ALmodulatorState *UNUSED(state),
static ALvoid ALmodulatorState_update(ALmodulatorState *state, ALCdevice *Device, const ALeffectslot *Slot)
{
- ALfloat gain, cw, a;
+ ALfloat cw, a;
if(Slot->EffectProps.Modulator.Waveform == AL_RING_MODULATOR_SINUSOID)
state->Waveform = SINUSOID;
@@ -149,8 +149,7 @@ static ALvoid ALmodulatorState_update(ALmodulatorState *state, ALCdevice *Device
state->Filter.a[1] = -a;
state->Filter.a[2] = 0.0f;
- gain = 1.0f/Device->NumSpeakers * Slot->Gain;
- SetGains(Device, gain, state->Gain);
+ ComputeAmbientGains(Device, Slot->Gain, state->Gain);
}
static ALvoid ALmodulatorState_process(ALmodulatorState *state, ALuint SamplesToDo, const ALfloat *restrict SamplesIn, ALfloat (*restrict SamplesOut)[BUFFERSIZE])