axmol/thirdparty/openal/core/front_stablizer.h

32 lines
866 B
C
Raw Normal View History

2021-05-14 10:15:42 +08:00
#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 {
2023-02-04 15:03:54 +08:00
FrontStablizer(size_t numchans) : ChannelFilters{numchans} { }
2021-05-14 10:15:42 +08:00
2023-02-04 15:03:54 +08:00
alignas(16) std::array<float,BufferLineSize> MidDirect{};
alignas(16) std::array<float,BufferLineSize> Side{};
alignas(16) std::array<float,BufferLineSize> Temp{};
2021-05-14 10:15:42 +08:00
BandSplitter MidFilter;
alignas(16) FloatBufferLine MidLF{};
alignas(16) FloatBufferLine MidHF{};
2023-02-04 15:03:54 +08:00
al::FlexArray<BandSplitter,16> ChannelFilters;
2021-05-14 10:15:42 +08:00
static std::unique_ptr<FrontStablizer> Create(size_t numchans)
{ return std::unique_ptr<FrontStablizer>{new(FamCount(numchans)) FrontStablizer{numchans}}; }
2023-02-04 15:03:54 +08:00
DEF_FAM_NEWDEL(FrontStablizer, ChannelFilters)
2021-05-14 10:15:42 +08:00
};
#endif /* CORE_FRONT_STABLIZER_H */