From f1380d830a5a1724448b1b0d23050f549ed4f3d7 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 25 Nov 2021 20:29:50 -0800 Subject: Avoid passing spans unnecessarily --- alc/alu.cpp | 4 ++-- core/uhjfilter.cpp | 8 ++++---- core/uhjfilter.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/alc/alu.cpp b/alc/alu.cpp index b317a40f..aa369829 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -313,8 +313,8 @@ void DeviceBase::ProcessUhj(const size_t SamplesToDo) const uint ridx{RealOut.ChannelIndex[FrontRight]}; /* Encode to stereo-compatible 2-channel UHJ output. */ - mUhjEncoder->encode(RealOut.Buffer[lidx], RealOut.Buffer[ridx], Dry.Buffer.data(), - SamplesToDo); + mUhjEncoder->encode(RealOut.Buffer[lidx].data(), RealOut.Buffer[ridx].data(), + Dry.Buffer.data(), SamplesToDo); } void DeviceBase::ProcessBs2b(const size_t SamplesToDo) diff --git a/core/uhjfilter.cpp b/core/uhjfilter.cpp index a7b68300..0875211c 100644 --- a/core/uhjfilter.cpp +++ b/core/uhjfilter.cpp @@ -38,13 +38,13 @@ const PhaseShifterT PShift{}; * impulse with the desired shift. */ -void UhjEncoder::encode(const FloatBufferSpan LeftOut, const FloatBufferSpan RightOut, - const FloatBufferLine *InSamples, const size_t SamplesToDo) +void UhjEncoder::encode(float *LeftOut, float *RightOut, const FloatBufferLine *InSamples, + const size_t SamplesToDo) { ASSUME(SamplesToDo > 0); - float *RESTRICT left{al::assume_aligned<16>(LeftOut.data())}; - float *RESTRICT right{al::assume_aligned<16>(RightOut.data())}; + float *RESTRICT left{al::assume_aligned<16>(LeftOut)}; + float *RESTRICT right{al::assume_aligned<16>(RightOut)}; const float *RESTRICT winput{al::assume_aligned<16>(InSamples[0].data())}; const float *RESTRICT xinput{al::assume_aligned<16>(InSamples[1].data())}; diff --git a/core/uhjfilter.h b/core/uhjfilter.h index 0f4668cd..000b02ec 100644 --- a/core/uhjfilter.h +++ b/core/uhjfilter.h @@ -30,8 +30,8 @@ struct UhjEncoder : public UhjFilterBase { * signal. The input must use FuMa channel ordering and UHJ scaling (FuMa * with an additional +3dB boost). */ - void encode(const FloatBufferSpan LeftOut, const FloatBufferSpan RightOut, - const FloatBufferLine *InSamples, const size_t SamplesToDo); + void encode(float *LeftOut, float *RightOut, const FloatBufferLine *InSamples, + const size_t SamplesToDo); DEF_NEWDEL(UhjEncoder) }; -- cgit v1.2.3