Scale B-Format panning coefficients only when needed
[openal-soft.git] / core / front_stablizer.h
blob6825111a7c6a783c7b7e994fc91ea7bada7be9ea
1 #ifndef CORE_FRONT_STABLIZER_H
2 #define CORE_FRONT_STABLIZER_H
4 #include <array>
5 #include <memory>
7 #include "almalloc.h"
8 #include "bufferline.h"
9 #include "filters/splitter.h"
12 struct FrontStablizer {
13 FrontStablizer(size_t numchans) : ChannelFilters{numchans} { }
15 alignas(16) std::array<float,BufferLineSize> MidDirect{};
16 alignas(16) std::array<float,BufferLineSize> Side{};
17 alignas(16) std::array<float,BufferLineSize> Temp{};
19 BandSplitter MidFilter;
20 alignas(16) FloatBufferLine MidLF{};
21 alignas(16) FloatBufferLine MidHF{};
23 al::FlexArray<BandSplitter,16> ChannelFilters;
25 static std::unique_ptr<FrontStablizer> Create(size_t numchans)
26 { return std::unique_ptr<FrontStablizer>{new(FamCount(numchans)) FrontStablizer{numchans}}; }
28 DEF_FAM_NEWDEL(FrontStablizer, ChannelFilters)
31 #endif /* CORE_FRONT_STABLIZER_H */