aboutsummaryrefslogtreecommitdiffstats
path: root/core/front_stablizer.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/front_stablizer.h')
-rw-r--r--core/front_stablizer.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/core/front_stablizer.h b/core/front_stablizer.h
new file mode 100644
index 00000000..6825111a
--- /dev/null
+++ b/core/front_stablizer.h
@@ -0,0 +1,31 @@
+#ifndef CORE_FRONT_STABLIZER_H
+#define CORE_FRONT_STABLIZER_H
+
+#include <array>
+#include <memory>
+
+#include "almalloc.h"
+#include "bufferline.h"
+#include "filters/splitter.h"
+
+
+struct FrontStablizer {
+ FrontStablizer(size_t numchans) : ChannelFilters{numchans} { }
+
+ alignas(16) std::array<float,BufferLineSize> MidDirect{};
+ alignas(16) std::array<float,BufferLineSize> Side{};
+ alignas(16) std::array<float,BufferLineSize> Temp{};
+
+ BandSplitter MidFilter;
+ alignas(16) FloatBufferLine MidLF{};
+ alignas(16) FloatBufferLine MidHF{};
+
+ al::FlexArray<BandSplitter,16> ChannelFilters;
+
+ static std::unique_ptr<FrontStablizer> Create(size_t numchans)
+ { return std::unique_ptr<FrontStablizer>{new(FamCount(numchans)) FrontStablizer{numchans}}; }
+
+ DEF_FAM_NEWDEL(FrontStablizer, ChannelFilters)
+};
+
+#endif /* CORE_FRONT_STABLIZER_H */