diff options
author | Chris Robinson <[email protected]> | 2020-10-21 17:16:27 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-10-21 17:16:27 -0700 |
commit | 7bb37deb51c6c1d0faa4f2fbe92f8051e64d6401 (patch) | |
tree | e1a8cf7da46d8816ee0e1a3ff6151206735bc981 /alc/effects/fshifter.cpp | |
parent | 3e62600ecc3c2f1be4da0d3e8166f5c67cc25fed (diff) |
Replace the mixer fraction macros with constexpr variables
Diffstat (limited to 'alc/effects/fshifter.cpp')
-rw-r--r-- | alc/effects/fshifter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/alc/effects/fshifter.cpp b/alc/effects/fshifter.cpp index 2ad98231..f3f409e0 100644 --- a/alc/effects/fshifter.cpp +++ b/alc/effects/fshifter.cpp @@ -114,7 +114,7 @@ void FshifterState::update(const ALCcontext *context, const ALeffectslot *slot, const ALCdevice *device{context->mDevice.get()}; const float step{props->Fshifter.Frequency / static_cast<float>(device->Frequency)}; - mPhaseStep[0] = mPhaseStep[1] = fastf2u(minf(step, 1.0f) * FRACTIONONE); + mPhaseStep[0] = mPhaseStep[1] = fastf2u(minf(step, 1.0f) * MixerFracOne); switch(props->Fshifter.LeftDirection) { @@ -202,12 +202,12 @@ void FshifterState::process(const size_t samplesToDo, const al::span<const Float ALuint phase_idx{mPhase[c]}; for(size_t k{0};k < samplesToDo;++k) { - const double phase{phase_idx * ((1.0 / FRACTIONONE) * al::MathDefs<double>::Tau())}; + const double phase{phase_idx * ((1.0/MixerFracOne) * al::MathDefs<double>::Tau())}; BufferOut[k] = static_cast<float>(mOutdata[k].real()*std::cos(phase) + mOutdata[k].imag()*std::sin(phase)*mSign[c]); phase_idx += phase_step; - phase_idx &= FRACTIONMASK; + phase_idx &= MixerFracMask; } mPhase[c] = phase_idx; |