1 #ifndef CORE_MIXER_HRTFDEFS_H
2 #define CORE_MIXER_HRTFDEFS_H
7 #include "core/ambidefs.h"
8 #include "core/bufferline.h"
9 #include "core/filters/splitter.h"
12 using float2
= std::array
<float,2>;
13 using ubyte
= unsigned char;
14 using ubyte2
= std::array
<ubyte
,2>;
15 using ushort
= unsigned short;
16 using uint
= unsigned int;
17 using uint2
= std::array
<uint
,2>;
19 constexpr uint HrtfHistoryBits
{6};
20 constexpr uint HrtfHistoryLength
{1 << HrtfHistoryBits
};
21 constexpr uint HrtfHistoryMask
{HrtfHistoryLength
- 1};
23 constexpr uint HrirBits
{7};
24 constexpr uint HrirLength
{1 << HrirBits
};
25 constexpr uint HrirMask
{HrirLength
- 1};
27 constexpr uint MinIrLength
{8};
29 using HrirArray
= std::array
<float2
,HrirLength
>;
30 using HrirSpan
= al::span
<float2
,HrirLength
>;
31 using ConstHrirSpan
= al::span
<const float2
,HrirLength
>;
33 struct MixHrtfFilter
{
34 const ConstHrirSpan Coeffs
;
41 alignas(16) HrirArray Coeffs
;
47 struct HrtfChannelState
{
48 BandSplitter mSplitter
;
50 alignas(16) HrirArray mCoeffs
{};
53 #endif /* CORE_MIXER_HRTFDEFS_H */