summaryrefslogtreecommitdiffstats
path: root/Alc/alcModulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/alcModulator.c')
-rw-r--r--Alc/alcModulator.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Alc/alcModulator.c b/Alc/alcModulator.c
index 11bb7d48..4224ecb4 100644
--- a/Alc/alcModulator.c
+++ b/Alc/alcModulator.c
@@ -108,19 +108,20 @@ static ALvoid ModulatorUpdate(ALeffectState *effect, ALCcontext *Context, const
ALmodulatorState *state = (ALmodulatorState*)effect;
ALfloat cw, a = 0.0f;
- if(Effect->Modulator.Waveform == AL_RING_MODULATOR_SINUSOID)
+ if(Effect->Params.Modulator.Waveform == AL_RING_MODULATOR_SINUSOID)
state->Waveform = SINUSOID;
- else if(Effect->Modulator.Waveform == AL_RING_MODULATOR_SAWTOOTH)
+ else if(Effect->Params.Modulator.Waveform == AL_RING_MODULATOR_SAWTOOTH)
state->Waveform = SAWTOOTH;
- else if(Effect->Modulator.Waveform == AL_RING_MODULATOR_SQUARE)
+ else if(Effect->Params.Modulator.Waveform == AL_RING_MODULATOR_SQUARE)
state->Waveform = SQUARE;
- state->step = Effect->Modulator.Frequency*(1<<WAVEFORM_FRACBITS) /
+ state->step = Effect->Params.Modulator.Frequency*(1<<WAVEFORM_FRACBITS) /
Context->Device->Frequency;
if(!state->step)
state->step = 1;
- cw = cos(2.0*M_PI * Effect->Modulator.HighPassCutoff / Context->Device->Frequency);
+ cw = cos(2.0*M_PI * Effect->Params.Modulator.HighPassCutoff /
+ Context->Device->Frequency);
a = (2.0f-cw) - aluSqrt(aluPow(2.0f-cw, 2.0f) - 1.0f);
state->iirFilter.coeff = a;
}