diff options
author | Chris Robinson <[email protected]> | 2016-05-13 18:28:01 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-05-13 18:28:01 -0700 |
commit | 93a94d177c4bb0b9c8feb85420a388d32df4cc8f (patch) | |
tree | 9a395a1ce06ed8e6057c6b74ae520f8140fa977e /Alc/effects/flanger.c | |
parent | 59cd6230a661d5cee69c0a44c4dde152eed9f865 (diff) |
Get rid of an unnecessary copy of ALeffectProps
Diffstat (limited to 'Alc/effects/flanger.c')
-rw-r--r-- | Alc/effects/flanger.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Alc/effects/flanger.c b/Alc/effects/flanger.c index 966622e6..7b55977e 100644 --- a/Alc/effects/flanger.c +++ b/Alc/effects/flanger.c @@ -92,14 +92,14 @@ static ALboolean ALflangerState_deviceUpdate(ALflangerState *state, ALCdevice *D return AL_TRUE; } -static ALvoid ALflangerState_update(ALflangerState *state, const ALCdevice *Device, const ALeffectslot *Slot) +static ALvoid ALflangerState_update(ALflangerState *state, const ALCdevice *Device, const ALeffectslot *Slot, const ALeffectProps *props) { ALfloat frequency = (ALfloat)Device->Frequency; ALfloat coeffs[MAX_AMBI_COEFFS]; ALfloat rate; ALint phase; - switch(Slot->Params.EffectProps.Flanger.Waveform) + switch(props->Flanger.Waveform) { case AL_FLANGER_WAVEFORM_TRIANGLE: state->waveform = FWF_Triangle; @@ -108,9 +108,9 @@ static ALvoid ALflangerState_update(ALflangerState *state, const ALCdevice *Devi state->waveform = FWF_Sinusoid; break; } - state->depth = Slot->Params.EffectProps.Flanger.Depth; - state->feedback = Slot->Params.EffectProps.Flanger.Feedback; - state->delay = fastf2i(Slot->Params.EffectProps.Flanger.Delay * frequency); + state->depth = props->Flanger.Depth; + state->feedback = props->Flanger.Feedback; + state->delay = fastf2i(props->Flanger.Delay * frequency); /* Gains for left and right sides */ CalcXYZCoeffs(-1.0f, 0.0f, 0.0f, 0.0f, coeffs); @@ -118,8 +118,8 @@ static ALvoid ALflangerState_update(ALflangerState *state, const ALCdevice *Devi CalcXYZCoeffs( 1.0f, 0.0f, 0.0f, 0.0f, coeffs); ComputePanningGains(Device->Dry, coeffs, Slot->Params.Gain, state->Gain[1]); - phase = Slot->Params.EffectProps.Flanger.Phase; - rate = Slot->Params.EffectProps.Flanger.Rate; + phase = props->Flanger.Phase; + rate = props->Flanger.Rate; if(!(rate > 0.0f)) { state->lfo_scale = 0.0f; |