diff options
author | Chris Robinson <[email protected]> | 2022-05-06 04:14:34 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-05-06 04:14:34 -0700 |
commit | 7e6ed2fa953417cc4cb67dcd18e684121fa4767e (patch) | |
tree | 44a48d0ad4efd7b5a0e1a9a3ad98e45df960afc8 /core | |
parent | de33f4968c0f6b44161948af17320b87cbadc5d2 (diff) |
Use an array of pointers for the UHJ encoder input
Diffstat (limited to 'core')
-rw-r--r-- | core/uhjfilter.cpp | 10 | ||||
-rw-r--r-- | core/uhjfilter.h | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/core/uhjfilter.cpp b/core/uhjfilter.cpp index 7a68f1b1..7fb23131 100644 --- a/core/uhjfilter.cpp +++ b/core/uhjfilter.cpp @@ -36,17 +36,17 @@ const PhaseShifterT<UhjFilterBase::sFilterDelay*2> PShift{}; * impulse with the desired shift. */ -void UhjEncoder::encode(float *LeftOut, float *RightOut, const FloatBufferLine *InSamples, - const size_t SamplesToDo) +void UhjEncoder::encode(float *LeftOut, float *RightOut, + const al::span<const float*const,3> InSamples, const size_t SamplesToDo) { ASSUME(SamplesToDo > 0); 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())}; - const float *RESTRICT yinput{al::assume_aligned<16>(InSamples[2].data())}; + const float *RESTRICT winput{al::assume_aligned<16>(InSamples[0])}; + const float *RESTRICT xinput{al::assume_aligned<16>(InSamples[1])}; + const float *RESTRICT yinput{al::assume_aligned<16>(InSamples[2])}; /* Combine the previously delayed S/D signal with the input. Include any * existing direct signal with it. diff --git a/core/uhjfilter.h b/core/uhjfilter.h index 0453def5..8f2736bf 100644 --- a/core/uhjfilter.h +++ b/core/uhjfilter.h @@ -4,6 +4,7 @@ #include <array> #include "almalloc.h" +#include "alspan.h" #include "bufferline.h" #include "resampler_limits.h" @@ -30,7 +31,7 @@ struct UhjEncoder : public UhjFilterBase { * signal. The input must use FuMa channel ordering and UHJ scaling (FuMa * with an additional +3dB boost). */ - void encode(float *LeftOut, float *RightOut, const FloatBufferLine *InSamples, + void encode(float *LeftOut, float *RightOut, const al::span<const float*const,3> InSamples, const size_t SamplesToDo); DEF_NEWDEL(UhjEncoder) |