🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
1.0 KiB

#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 {
static constexpr size_t DelayLength{256u};
FrontStablizer(size_t numchans) : DelayBuf{numchans} { }
alignas(16) std::array<float,BufferLineSize + DelayLength> Side{};
alignas(16) std::array<float,BufferLineSize + DelayLength> MidDirect{};
alignas(16) std::array<float,DelayLength> MidDelay{};
alignas(16) std::array<float,BufferLineSize + DelayLength> TempBuf{};
BandSplitter MidFilter;
alignas(16) FloatBufferLine MidLF{};
alignas(16) FloatBufferLine MidHF{};
using DelayLine = std::array<float,DelayLength>;
al::FlexArray<DelayLine,16> DelayBuf;
static std::unique_ptr<FrontStablizer> Create(size_t numchans)
{ return std::unique_ptr<FrontStablizer>{new(FamCount(numchans)) FrontStablizer{numchans}}; }
DEF_FAM_NEWDEL(FrontStablizer, DelayBuf)
};
#endif /* CORE_FRONT_STABLIZER_H */