diff options
Diffstat (limited to 'alc/effects/pshifter.cpp')
-rw-r--r-- | alc/effects/pshifter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alc/effects/pshifter.cpp b/alc/effects/pshifter.cpp index d923e376..44ddc694 100644 --- a/alc/effects/pshifter.cpp +++ b/alc/effects/pshifter.cpp @@ -107,7 +107,7 @@ void PshifterState::deviceUpdate(const ALCdevice *device) { /* (Re-)initializing parameters and clear the buffers. */ mCount = FIFO_LATENCY; - mPitchShiftI = FRACTIONONE; + mPitchShiftI = MixerFracOne; mPitchShift = 1.0; mFreqPerBin = device->Frequency / double{STFT_SIZE}; @@ -127,8 +127,8 @@ void PshifterState::update(const ALCcontext*, const ALeffectslot *slot, const Ef { const int tune{props->Pshifter.CoarseTune*100 + props->Pshifter.FineTune}; const float pitch{std::pow(2.0f, static_cast<float>(tune) / 1200.0f)}; - mPitchShiftI = fastf2u(pitch*FRACTIONONE); - mPitchShift = mPitchShiftI * double{1.0/FRACTIONONE}; + mPitchShiftI = fastf2u(pitch*MixerFracOne); + mPitchShift = mPitchShiftI * double{1.0/MixerFracOne}; const auto coeffs = CalcDirectionCoeffs({0.0f, 0.0f, -1.0f}, 0.0f); @@ -206,7 +206,7 @@ void PshifterState::process(const size_t samplesToDo, const al::span<const Float std::fill(mSynthesisBuffer.begin(), mSynthesisBuffer.end(), FrequencyBin{}); for(size_t k{0u};k < STFT_HALF_SIZE+1;k++) { - const size_t j{(k*mPitchShiftI + (FRACTIONONE>>1)) >> FRACTIONBITS}; + const size_t j{(k*mPitchShiftI + (MixerFracOne>>1)) >> MixerFracBits}; if(j >= STFT_HALF_SIZE+1) break; mSynthesisBuffer[j].Amplitude += mAnalysisBuffer[k].Amplitude; |