#ifndef CORE_MIXER_HRTFDEFS_H #define CORE_MIXER_HRTFDEFS_H #include #include "alspan.h" #include "core/ambidefs.h" #include "core/bufferline.h" #include "core/filters/splitter.h" using float2 = std::array; using ubyte = unsigned char; using ubyte2 = std::array; using ushort = unsigned short; using uint = unsigned int; using uint2 = std::array; constexpr uint HrtfHistoryBits{6}; constexpr uint HrtfHistoryLength{1 << HrtfHistoryBits}; constexpr uint HrtfHistoryMask{HrtfHistoryLength - 1}; constexpr uint HrirBits{7}; constexpr uint HrirLength{1 << HrirBits}; constexpr uint HrirMask{HrirLength - 1}; constexpr uint MinIrLength{8}; constexpr uint HrtfDirectDelay{256}; using HrirArray = std::array; using HrirSpan = al::span; using ConstHrirSpan = al::span; struct MixHrtfFilter { const ConstHrirSpan Coeffs; uint2 Delay; float Gain; float GainStep; }; struct HrtfFilter { alignas(16) HrirArray Coeffs; uint2 Delay; float Gain; }; struct HrtfChannelState { std::array mDelay{}; BandSplitter mSplitter; float mHfScale{}; alignas(16) HrirArray mCoeffs{}; }; #endif /* CORE_MIXER_HRTFDEFS_H */