From ed0b4d78563a9d15c9a2a7b091058c2ac580b266 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 12 May 2023 15:47:12 -0700 Subject: Remove some old compatibility code --- core/bsinc_tables.cpp | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'core/bsinc_tables.cpp') diff --git a/core/bsinc_tables.cpp b/core/bsinc_tables.cpp index 693645f4..1b3f5784 100644 --- a/core/bsinc_tables.cpp +++ b/core/bsinc_tables.cpp @@ -7,10 +7,11 @@ #include #include #include -#include +#include #include "alnumbers.h" -#include "core/mixer/defs.h" +#include "bsinc_defs.h" +#include "resampler_limits.h" namespace { @@ -142,26 +143,6 @@ constexpr BSincHeader bsinc12_hdr{60, 11}; constexpr BSincHeader bsinc24_hdr{60, 23}; -/* NOTE: GCC 5 has an issue with BSincHeader objects being in an anonymous - * namespace while also being used as non-type template parameters. - */ -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ < 6 - -/* The number of sample points is double the a value (rounded up to a multiple - * of 4), and scale index 0 includes the doubling for downsampling. bsinc24 is - * currently the highest quality filter, and will use the most sample points. - */ -constexpr uint BSincPointsMax{(bsinc24_hdr.a[0]*2 + 3) & ~3u}; -static_assert(BSincPointsMax <= MaxResamplerPadding, "MaxResamplerPadding is too small"); - -template -struct BSincFilterArray { - alignas(16) std::array mTable; - const BSincHeader &hdr; - - BSincFilterArray(const BSincHeader &hdr_) : hdr{hdr_} - { -#else template struct BSincFilterArray { alignas(16) std::array mTable{}; @@ -170,7 +151,7 @@ struct BSincFilterArray { { constexpr uint BSincPointsMax{(hdr.a[0]*2 + 3) & ~3u}; static_assert(BSincPointsMax <= MaxResamplerPadding, "MaxResamplerPadding is too small"); -#endif + using filter_type = double[BSincPhaseCount+1][BSincPointsMax]; auto filter = std::make_unique(BSincScaleCount); @@ -265,13 +246,8 @@ struct BSincFilterArray { constexpr const float *getTable() const noexcept { return &mTable.front(); } }; -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ < 6 -const BSincFilterArray bsinc12_filter{bsinc12_hdr}; -const BSincFilterArray bsinc24_filter{bsinc24_hdr}; -#else const BSincFilterArray bsinc12_filter{}; const BSincFilterArray bsinc24_filter{}; -#endif template constexpr BSincTable GenerateBSincTable(const T &filter) -- cgit v1.2.3