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/modulator.c | |
parent | 59cd6230a661d5cee69c0a44c4dde152eed9f865 (diff) |
Get rid of an unnecessary copy of ALeffectProps
Diffstat (limited to 'Alc/effects/modulator.c')
-rw-r--r-- | Alc/effects/modulator.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Alc/effects/modulator.c b/Alc/effects/modulator.c index 5a96bb9d..0b0971b2 100644 --- a/Alc/effects/modulator.c +++ b/Alc/effects/modulator.c @@ -92,25 +92,25 @@ static ALboolean ALmodulatorState_deviceUpdate(ALmodulatorState *UNUSED(state), return AL_TRUE; } -static ALvoid ALmodulatorState_update(ALmodulatorState *state, const ALCdevice *Device, const ALeffectslot *Slot) +static ALvoid ALmodulatorState_update(ALmodulatorState *state, const ALCdevice *Device, const ALeffectslot *Slot, const ALeffectProps *props) { aluMatrixf matrix; ALfloat cw, a; ALuint i; - if(Slot->Params.EffectProps.Modulator.Waveform == AL_RING_MODULATOR_SINUSOID) + if(props->Modulator.Waveform == AL_RING_MODULATOR_SINUSOID) state->Process = ModulateSin; - else if(Slot->Params.EffectProps.Modulator.Waveform == AL_RING_MODULATOR_SAWTOOTH) + else if(props->Modulator.Waveform == AL_RING_MODULATOR_SAWTOOTH) state->Process = ModulateSaw; else /*if(Slot->Params.EffectProps.Modulator.Waveform == AL_RING_MODULATOR_SQUARE)*/ state->Process = ModulateSquare; - state->step = fastf2u(Slot->Params.EffectProps.Modulator.Frequency*WAVEFORM_FRACONE / + state->step = fastf2u(props->Modulator.Frequency*WAVEFORM_FRACONE / Device->Frequency); if(state->step == 0) state->step = 1; /* Custom filter coeffs, which match the old version instead of a low-shelf. */ - cw = cosf(F_TAU * Slot->Params.EffectProps.Modulator.HighPassCutoff / Device->Frequency); + cw = cosf(F_TAU * props->Modulator.HighPassCutoff / Device->Frequency); a = (2.0f-cw) - sqrtf(powf(2.0f-cw, 2.0f) - 1.0f); for(i = 0;i < MAX_EFFECT_CHANNELS;i++) |