aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-11-25 20:29:50 -0800
committerChris Robinson <[email protected]>2021-11-25 20:29:50 -0800
commitf1380d830a5a1724448b1b0d23050f549ed4f3d7 (patch)
tree91ea8ed696f0c3c94f895c2c3c3c4c76fccd8b94
parentc5831c92f38fb1200380ad8bb6ff6b8ce44279b9 (diff)
Avoid passing spans unnecessarily
-rw-r--r--alc/alu.cpp4
-rw-r--r--core/uhjfilter.cpp8
-rw-r--r--core/uhjfilter.h4
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<UhjFilterBase::sFilterDelay*2> 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)
};