Use an array of pointers for the UHJ encoder input

This commit is contained in:
Chris Robinson 2022-05-06 04:14:34 -07:00
parent de33f4968c
commit 7e6ed2fa95
3 changed files with 8 additions and 7 deletions

View File

@ -305,7 +305,7 @@ void DeviceBase::ProcessUhj(const size_t SamplesToDo)
/* Encode to stereo-compatible 2-channel UHJ output. */
mUhjEncoder->encode(RealOut.Buffer[lidx].data(), RealOut.Buffer[ridx].data(),
Dry.Buffer.data(), SamplesToDo);
{{Dry.Buffer[0].data(), Dry.Buffer[1].data(), Dry.Buffer[2].data()}}, SamplesToDo);
}
void DeviceBase::ProcessBs2b(const size_t SamplesToDo)

View File

@ -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.

View File

@ -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)