diff options
author | Chris Robinson <[email protected]> | 2019-12-21 02:02:57 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-12-21 02:02:57 -0800 |
commit | 54e7f48df9366db30e4e7f5f3cca1d7a3ca9a1b4 (patch) | |
tree | 6b60392a0e355bcbaa0531c11677623ceb0b8f54 /alc/effects/modulator.cpp | |
parent | 274fd36eddb8d37dcbe44cea1117a7027a653a67 (diff) |
Use unique setters for biquad filter parameters
One for whether a slope parameter is used, and one for bandwidth.
Diffstat (limited to 'alc/effects/modulator.cpp')
-rw-r--r-- | alc/effects/modulator.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/alc/effects/modulator.cpp b/alc/effects/modulator.cpp index aee896fb..aa339dea 100644 --- a/alc/effects/modulator.cpp +++ b/alc/effects/modulator.cpp @@ -115,11 +115,10 @@ void ModulatorState::update(const ALCcontext *context, const ALeffectslot *slot, else /*if(props->Modulator.Waveform == AL_RING_MODULATOR_SQUARE)*/ mGetSamples = Modulate<Square>; - ALfloat f0norm{props->Modulator.HighPassCutoff / static_cast<ALfloat>(device->Frequency)}; + float f0norm{props->Modulator.HighPassCutoff / static_cast<ALfloat>(device->Frequency)}; f0norm = clampf(f0norm, 1.0f/512.0f, 0.49f); /* Bandwidth value is constant in octaves. */ - mChans[0].Filter.setParams(BiquadType::HighPass, 1.0f, f0norm, - BiquadFilter::rcpQFromBandwidth(f0norm, 0.75f)); + mChans[0].Filter.setParamsFromBandwidth(BiquadType::HighPass, f0norm, 1.0f, 0.75f); for(size_t i{1u};i < slot->Wet.Buffer.size();++i) mChans[i].Filter.copyParamsFrom(mChans[0].Filter); |