From 882b4acae80f41547a9e16b7def02a972842c857 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 28 Sep 2019 01:58:29 -0700 Subject: Add "fast" variants for the bsinc resamplers This simply omits the scale factor from the filter, similar to how up-sampling does. The consequence of this is less smooth transitions when ramping the pitch while down-sampling, but otherwise behaves fine. --- alc/alu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'alc/alu.cpp') diff --git a/alc/alu.cpp b/alc/alu.cpp index 86d2789e..5df1c3a2 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -947,9 +947,9 @@ void CalcNonAttnSourceParams(ALvoice *voice, const ALvoicePropsBase *props, cons voice->mStep = MAX_PITCH<mStep = maxu(fastf2u(Pitch * FRACTIONONE), 1); - if(props->mResampler == Resampler::BSinc24) + if(props->mResampler == Resampler::BSinc24 || props->mResampler == Resampler::FastBSinc24) BsincPrepare(voice->mStep, &voice->mResampleState.bsinc, &bsinc24); - else if(props->mResampler == Resampler::BSinc12) + else if(props->mResampler == Resampler::BSinc12 || props->mResampler == Resampler::FastBSinc12) BsincPrepare(voice->mStep, &voice->mResampleState.bsinc, &bsinc12); voice->mResampler = SelectResampler(props->mResampler, voice->mStep); @@ -1277,9 +1277,9 @@ void CalcAttnSourceParams(ALvoice *voice, const ALvoicePropsBase *props, const A voice->mStep = MAX_PITCH<mStep = maxu(fastf2u(Pitch * FRACTIONONE), 1); - if(props->mResampler == Resampler::BSinc24) + if(props->mResampler == Resampler::BSinc24 || props->mResampler == Resampler::FastBSinc24) BsincPrepare(voice->mStep, &voice->mResampleState.bsinc, &bsinc24); - else if(props->mResampler == Resampler::BSinc12) + else if(props->mResampler == Resampler::BSinc12 || props->mResampler == Resampler::FastBSinc12) BsincPrepare(voice->mStep, &voice->mResampleState.bsinc, &bsinc12); voice->mResampler = SelectResampler(props->mResampler, voice->mStep); -- cgit v1.2.3