From 5038ba4d6ba42a777a2bec8780a53e39db028474 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 24 Apr 2022 22:32:59 -0700 Subject: Clean up some case spaghetti --- alc/alu.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/alc/alu.cpp b/alc/alu.cpp index ef885152..50603589 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -135,9 +135,6 @@ float XScale{1.0f}; float YScale{1.0f}; float ZScale{1.0f}; -} // namespace - -namespace { struct ChanMap { Channel channel; @@ -213,30 +210,30 @@ inline ResamplerFunc SelectResampler(Resampler resampler, uint increment) return Resample_; case Resampler::BSinc12: case Resampler::BSinc24: - if(increment <= MixerFracOne) + if(increment > MixerFracOne) { - /* fall-through */ - case Resampler::FastBSinc12: - case Resampler::FastBSinc24: #ifdef HAVE_NEON if((CPUCapFlags&CPU_CAP_NEON)) - return Resample_; + return Resample_; #endif #ifdef HAVE_SSE if((CPUCapFlags&CPU_CAP_SSE)) - return Resample_; + return Resample_; #endif - return Resample_; + return Resample_; } + /* fall-through */ + case Resampler::FastBSinc12: + case Resampler::FastBSinc24: #ifdef HAVE_NEON if((CPUCapFlags&CPU_CAP_NEON)) - return Resample_; + return Resample_; #endif #ifdef HAVE_SSE if((CPUCapFlags&CPU_CAP_SSE)) - return Resample_; + return Resample_; #endif - return Resample_; + return Resample_; } return Resample_; -- cgit v1.2.3