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/echo.c | |
parent | 59cd6230a661d5cee69c0a44c4dde152eed9f865 (diff) |
Get rid of an unnecessary copy of ALeffectProps
Diffstat (limited to 'Alc/effects/echo.c')
-rw-r--r-- | Alc/effects/echo.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Alc/effects/echo.c b/Alc/effects/echo.c index eea86f15..0632a44d 100644 --- a/Alc/effects/echo.c +++ b/Alc/effects/echo.c @@ -82,17 +82,17 @@ static ALboolean ALechoState_deviceUpdate(ALechoState *state, ALCdevice *Device) return AL_TRUE; } -static ALvoid ALechoState_update(ALechoState *state, const ALCdevice *Device, const ALeffectslot *Slot) +static ALvoid ALechoState_update(ALechoState *state, const ALCdevice *Device, const ALeffectslot *Slot, const ALeffectProps *props) { ALuint frequency = Device->Frequency; ALfloat coeffs[MAX_AMBI_COEFFS]; ALfloat gain, lrpan, spread; - state->Tap[0].delay = fastf2u(Slot->Params.EffectProps.Echo.Delay * frequency) + 1; - state->Tap[1].delay = fastf2u(Slot->Params.EffectProps.Echo.LRDelay * frequency); + state->Tap[0].delay = fastf2u(props->Echo.Delay * frequency) + 1; + state->Tap[1].delay = fastf2u(props->Echo.LRDelay * frequency); state->Tap[1].delay += state->Tap[0].delay; - spread = Slot->Params.EffectProps.Echo.Spread; + spread = props->Echo.Spread; if(spread < 0.0f) lrpan = -1.0f; else lrpan = 1.0f; /* Convert echo spread (where 0 = omni, +/-1 = directional) to coverage @@ -100,9 +100,9 @@ static ALvoid ALechoState_update(ALechoState *state, const ALCdevice *Device, co */ spread = asinf(1.0f - fabsf(spread))*4.0f; - state->FeedGain = Slot->Params.EffectProps.Echo.Feedback; + state->FeedGain = props->Echo.Feedback; - gain = minf(1.0f - Slot->Params.EffectProps.Echo.Damping, 0.01f); + gain = minf(1.0f - props->Echo.Damping, 0.01f); ALfilterState_setParams(&state->Filter, ALfilterType_HighShelf, gain, LOWPASSFREQREF/frequency, calc_rcpQ_from_slope(gain, 0.75f)); |