diff options
author | Chris Robinson <[email protected]> | 2011-07-16 03:02:16 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-07-16 03:02:16 -0700 |
commit | 3bd7256dc826f21b30e90c9d761e8d5639700afe (patch) | |
tree | 275acee6c06705b4504dfd797fc073430e6626e3 /Alc/alcModulator.c | |
parent | da2429a1d0ad184abe24f61aa7e064b81026651c (diff) |
Pass the effect slot to the effect update method
Diffstat (limited to 'Alc/alcModulator.c')
-rw-r--r-- | Alc/alcModulator.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Alc/alcModulator.c b/Alc/alcModulator.c index 8244b454..1908007c 100644 --- a/Alc/alcModulator.c +++ b/Alc/alcModulator.c @@ -146,24 +146,24 @@ static ALboolean ModulatorDeviceUpdate(ALeffectState *effect, ALCdevice *Device) return AL_TRUE; } -static ALvoid ModulatorUpdate(ALeffectState *effect, ALCcontext *Context, const ALeffect *Effect) +static ALvoid ModulatorUpdate(ALeffectState *effect, ALCcontext *Context, const ALeffectslot *Slot) { ALmodulatorState *state = (ALmodulatorState*)effect; ALfloat cw, a = 0.0f; - if(Effect->Params.Modulator.Waveform == AL_RING_MODULATOR_SINUSOID) + if(Slot->effect.Params.Modulator.Waveform == AL_RING_MODULATOR_SINUSOID) state->Waveform = SINUSOID; - else if(Effect->Params.Modulator.Waveform == AL_RING_MODULATOR_SAWTOOTH) + else if(Slot->effect.Params.Modulator.Waveform == AL_RING_MODULATOR_SAWTOOTH) state->Waveform = SAWTOOTH; - else if(Effect->Params.Modulator.Waveform == AL_RING_MODULATOR_SQUARE) + else if(Slot->effect.Params.Modulator.Waveform == AL_RING_MODULATOR_SQUARE) state->Waveform = SQUARE; - state->step = Effect->Params.Modulator.Frequency*(1<<WAVEFORM_FRACBITS) / + state->step = Slot->effect.Params.Modulator.Frequency*(1<<WAVEFORM_FRACBITS) / Context->Device->Frequency; if(!state->step) state->step = 1; - cw = cos(2.0*M_PI * Effect->Params.Modulator.HighPassCutoff / + cw = cos(2.0*M_PI * Slot->effect.Params.Modulator.HighPassCutoff / Context->Device->Frequency); a = (2.0f-cw) - aluSqrt(aluPow(2.0f-cw, 2.0f) - 1.0f); state->iirFilter.coeff = a; |