diff options
author | Chris Robinson <[email protected]> | 2017-09-21 05:42:35 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-09-21 05:42:35 -0700 |
commit | 90cedbea49e9756d97033962f6c1145991bc7095 (patch) | |
tree | df6c91ac4c7f17b33b9153994ccf3fbaf3ce9a70 /Alc/effects/flanger.c | |
parent | 0b243f1aaf5251823bb0fda7fbb9cf30706fdf33 (diff) |
Pass the context to the auxiliary effect update method
Diffstat (limited to 'Alc/effects/flanger.c')
-rw-r--r-- | Alc/effects/flanger.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Alc/effects/flanger.c b/Alc/effects/flanger.c index b25b95cc..0db3321d 100644 --- a/Alc/effects/flanger.c +++ b/Alc/effects/flanger.c @@ -57,7 +57,7 @@ typedef struct ALflangerState { static ALvoid ALflangerState_Destruct(ALflangerState *state); static ALboolean ALflangerState_deviceUpdate(ALflangerState *state, ALCdevice *Device); -static ALvoid ALflangerState_update(ALflangerState *state, const ALCdevice *Device, const ALeffectslot *Slot, const ALeffectProps *props); +static ALvoid ALflangerState_update(ALflangerState *state, const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props); static ALvoid ALflangerState_process(ALflangerState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels); DECLARE_DEFAULT_ALLOCATORS(ALflangerState) @@ -115,9 +115,10 @@ static ALboolean ALflangerState_deviceUpdate(ALflangerState *state, ALCdevice *D return AL_TRUE; } -static ALvoid ALflangerState_update(ALflangerState *state, const ALCdevice *Device, const ALeffectslot *Slot, const ALeffectProps *props) +static ALvoid ALflangerState_update(ALflangerState *state, const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props) { - ALfloat frequency = (ALfloat)Device->Frequency; + const ALCdevice *device = context->Device; + ALfloat frequency = (ALfloat)device->Frequency; ALfloat coeffs[MAX_AMBI_COEFFS]; ALfloat rate; ALint phase; @@ -138,9 +139,9 @@ static ALvoid ALflangerState_update(ALflangerState *state, const ALCdevice *Devi /* Gains for left and right sides */ CalcAngleCoeffs(-F_PI_2, 0.0f, 0.0f, coeffs); - ComputePanningGains(Device->Dry, coeffs, Slot->Params.Gain, state->Gain[0]); + ComputePanningGains(device->Dry, coeffs, slot->Params.Gain, state->Gain[0]); CalcAngleCoeffs( F_PI_2, 0.0f, 0.0f, coeffs); - ComputePanningGains(Device->Dry, coeffs, Slot->Params.Gain, state->Gain[1]); + ComputePanningGains(device->Dry, coeffs, slot->Params.Gain, state->Gain[1]); phase = props->Flanger.Phase; rate = props->Flanger.Rate; |