diff --git a/alc/alu.cpp b/alc/alu.cpp index c0b7cc2f..2fe87ab6 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -273,7 +273,7 @@ ResamplerFunc PrepareResampler(Resampler resampler, uint increment, InterpState case Resampler::Linear: break; case Resampler::Cubic: - state->cubic.filter = gCubicSpline.Tab; + state->cubic.filter = gCubicSpline.Tab.data(); break; case Resampler::FastBSinc12: case Resampler::BSinc12: diff --git a/core/cubic_tables.cpp b/core/cubic_tables.cpp index bdcc0bae..18af3bb3 100644 --- a/core/cubic_tables.cpp +++ b/core/cubic_tables.cpp @@ -49,7 +49,7 @@ struct SplineFilterArray { mTable[pi].mDeltas[3] = -mTable[pi].mCoeffs[3]; } - constexpr const CubicCoefficients *getTable() const noexcept { return mTable; } + constexpr auto getTable() const noexcept { return al::as_span(mTable); } }; constexpr SplineFilterArray SplineFilter{}; diff --git a/core/cubic_tables.h b/core/cubic_tables.h index 297aa89e..88097ae2 100644 --- a/core/cubic_tables.h +++ b/core/cubic_tables.h @@ -1,11 +1,12 @@ #ifndef CORE_CUBIC_TABLES_H #define CORE_CUBIC_TABLES_H +#include "alspan.h" #include "cubic_defs.h" struct CubicTable { - const CubicCoefficients *Tab; + al::span Tab; }; /* A Catmull-Rom spline. The spline passes through the center two samples,