aboutsummaryrefslogtreecommitdiffstats
path: root/core/mixer/mixer_c.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-01-02 17:37:09 -0800
committerChris Robinson <[email protected]>2021-01-02 17:37:09 -0800
commit04cd0bc576947879525005b11abcd5230e215360 (patch)
tree3c14af02fb6cadcc0966b32263aade5c2816b8e3 /core/mixer/mixer_c.cpp
parent1f51de9983956732bdf63bff91258096eed84544 (diff)
Return non-const from the resampler function
Diffstat (limited to 'core/mixer/mixer_c.cpp')
-rw-r--r--core/mixer/mixer_c.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/core/mixer/mixer_c.cpp b/core/mixer/mixer_c.cpp
index 6d4909f4..ff9538a4 100644
--- a/core/mixer/mixer_c.cpp
+++ b/core/mixer/mixer_c.cpp
@@ -68,8 +68,8 @@ inline float do_fastbsinc(const InterpState &istate, const float *RESTRICT vals,
using SamplerT = float(&)(const InterpState&, const float*RESTRICT, const uint);
template<SamplerT Sampler>
-const float *DoResample(const InterpState *state, const float *RESTRICT src, uint frac,
- uint increment, const al::span<float> dst)
+float *DoResample(const InterpState *state, float *RESTRICT src, uint frac, uint increment,
+ const al::span<float> dst)
{
const InterpState istate{*state};
for(float &out : dst)
@@ -97,7 +97,7 @@ inline void ApplyCoeffs(float2 *RESTRICT Values, const size_t IrSize, const Hrir
} // namespace
template<>
-const float *Resample_<CopyTag,CTag>(const InterpState*, const float *RESTRICT src, uint, uint,
+float *Resample_<CopyTag,CTag>(const InterpState*, float *RESTRICT src, uint, uint,
const al::span<float> dst)
{
#if defined(HAVE_SSE) || defined(HAVE_NEON)
@@ -110,28 +110,28 @@ const float *Resample_<CopyTag,CTag>(const InterpState*, const float *RESTRICT s
}
template<>
-const float *Resample_<PointTag,CTag>(const InterpState *state, const float *RESTRICT src,
- uint frac, uint increment, const al::span<float> dst)
+float *Resample_<PointTag,CTag>(const InterpState *state, float *RESTRICT src, uint frac,
+ uint increment, const al::span<float> dst)
{ return DoResample<do_point>(state, src, frac, increment, dst); }
template<>
-const float *Resample_<LerpTag,CTag>(const InterpState *state, const float *RESTRICT src,
- uint frac, uint increment, const al::span<float> dst)
+float *Resample_<LerpTag,CTag>(const InterpState *state, float *RESTRICT src, uint frac,
+ uint increment, const al::span<float> dst)
{ return DoResample<do_lerp>(state, src, frac, increment, dst); }
template<>
-const float *Resample_<CubicTag,CTag>(const InterpState *state, const float *RESTRICT src,
- uint frac, uint increment, const al::span<float> dst)
+float *Resample_<CubicTag,CTag>(const InterpState *state, float *RESTRICT src, uint frac,
+ uint increment, const al::span<float> dst)
{ return DoResample<do_cubic>(state, src-1, frac, increment, dst); }
template<>
-const float *Resample_<BSincTag,CTag>(const InterpState *state, const float *RESTRICT src,
- uint frac, uint increment, const al::span<float> dst)
+float *Resample_<BSincTag,CTag>(const InterpState *state, float *RESTRICT src, uint frac,
+ uint increment, const al::span<float> dst)
{ return DoResample<do_bsinc>(state, src-state->bsinc.l, frac, increment, dst); }
template<>
-const float *Resample_<FastBSincTag,CTag>(const InterpState *state, const float *RESTRICT src,
- uint frac, uint increment, const al::span<float> dst)
+float *Resample_<FastBSincTag,CTag>(const InterpState *state, float *RESTRICT src, uint frac,
+ uint increment, const al::span<float> dst)
{ return DoResample<do_fastbsinc>(state, src-state->bsinc.l, frac, increment, dst); }