diff options
author | Chris Robinson <[email protected]> | 2011-05-20 09:36:36 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-05-20 09:36:36 -0700 |
commit | 35a0430c8134c6a13768cd6bf7b252d24ac9e2aa (patch) | |
tree | ddc1e3d248e7a257c4534bfc12943766e2d5d38c /Alc/alcModulator.c | |
parent | 1b5caa4112bf76d6b046d33a65d29d94daf03f43 (diff) |
Store the separate effect parameters in a union
Diffstat (limited to 'Alc/alcModulator.c')
-rw-r--r-- | Alc/alcModulator.c | 11 |
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; } |