Add missing linear resampler to the option setting list
[openal-soft.git] / alc / uhjfilter.h
blobe2ae7ef216c6379a8906ca764ca1a118b4f3dbbe
1 #ifndef UHJFILTER_H
2 #define UHJFILTER_H
4 #include <array>
6 #include "alcmain.h"
7 #include "almalloc.h"
10 struct Uhj2Encoder {
11 /* A particular property of the filter allows it to cover nearly twice its
12 * length, so the filter size is also the effective delay (despite being
13 * center-aligned).
15 constexpr static size_t sFilterSize{128};
17 /* Delays for the unfiltered signal. */
18 alignas(16) std::array<float,sFilterSize> mMidDelay{};
19 alignas(16) std::array<float,sFilterSize> mSideDelay{};
21 alignas(16) std::array<float,BUFFERSIZE+sFilterSize> mMid{};
22 alignas(16) std::array<float,BUFFERSIZE+sFilterSize> mSide{};
24 /* History for the FIR filter. */
25 alignas(16) std::array<float,sFilterSize*2 - 1> mSideHistory{};
27 alignas(16) std::array<float,BUFFERSIZE + sFilterSize*2> mTemp{};
29 /**
30 * Encodes a 2-channel UHJ (stereo-compatible) signal from a B-Format input
31 * signal. The input must use FuMa channel ordering and scaling.
33 void encode(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
34 const FloatBufferLine *InSamples, const size_t SamplesToDo);
36 DEF_NEWDEL(Uhj2Encoder)
39 #endif /* UHJFILTER_H */