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/chorus.c | |
parent | 59cd6230a661d5cee69c0a44c4dde152eed9f865 (diff) |
Get rid of an unnecessary copy of ALeffectProps
Diffstat (limited to 'Alc/effects/chorus.c')
-rw-r--r-- | Alc/effects/chorus.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Alc/effects/chorus.c b/Alc/effects/chorus.c index 3eff95a4..e1cbba2d 100644 --- a/Alc/effects/chorus.c +++ b/Alc/effects/chorus.c @@ -92,14 +92,14 @@ static ALboolean ALchorusState_deviceUpdate(ALchorusState *state, ALCdevice *Dev return AL_TRUE; } -static ALvoid ALchorusState_update(ALchorusState *state, const ALCdevice *Device, const ALeffectslot *Slot) +static ALvoid ALchorusState_update(ALchorusState *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.Chorus.Waveform) + switch(props->Chorus.Waveform) { case AL_CHORUS_WAVEFORM_TRIANGLE: state->waveform = CWF_Triangle; @@ -108,9 +108,9 @@ static ALvoid ALchorusState_update(ALchorusState *state, const ALCdevice *Device state->waveform = CWF_Sinusoid; break; } - state->depth = Slot->Params.EffectProps.Chorus.Depth; - state->feedback = Slot->Params.EffectProps.Chorus.Feedback; - state->delay = fastf2i(Slot->Params.EffectProps.Chorus.Delay * frequency); + state->depth = props->Chorus.Depth; + state->feedback = props->Chorus.Feedback; + state->delay = fastf2i(props->Chorus.Delay * frequency); /* Gains for left and right sides */ CalcXYZCoeffs(-1.0f, 0.0f, 0.0f, 0.0f, coeffs); @@ -118,8 +118,8 @@ static ALvoid ALchorusState_update(ALchorusState *state, const ALCdevice *Device CalcXYZCoeffs( 1.0f, 0.0f, 0.0f, 0.0f, coeffs); ComputePanningGains(Device->Dry, coeffs, Slot->Params.Gain, state->Gain[1]); - phase = Slot->Params.EffectProps.Chorus.Phase; - rate = Slot->Params.EffectProps.Chorus.Rate; + phase = props->Chorus.Phase; + rate = props->Chorus.Rate; if(!(rate > 0.0f)) { state->lfo_scale = 0.0f; |