From e179bf0a12e80eb41041469bc04ba1fbcffe11e8 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 12 Dec 2020 14:58:09 -0800 Subject: Move the mixer functions to core --- core/mixer/hrtfdefs.h | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 core/mixer/hrtfdefs.h (limited to 'core/mixer/hrtfdefs.h') diff --git a/core/mixer/hrtfdefs.h b/core/mixer/hrtfdefs.h new file mode 100644 index 00000000..623e6ec3 --- /dev/null +++ b/core/mixer/hrtfdefs.h @@ -0,0 +1,52 @@ +#ifndef CORE_MIXER_HRTFDEFS_H +#define CORE_MIXER_HRTFDEFS_H + +#include + +#include "core/ambidefs.h" +#include "core/bufferline.h" +#include "core/filters/splitter.h" + + +#define HRTF_HISTORY_BITS 6 +#define HRTF_HISTORY_LENGTH (1<; +using HrirArray = std::array; +using ubyte = unsigned char; +using ubyte2 = std::array; +using ushort = unsigned short; +using uint = unsigned int; + + +struct MixHrtfFilter { + const HrirArray *Coeffs; + std::array Delay; + float Gain; + float GainStep; +}; + +struct HrtfFilter { + alignas(16) HrirArray Coeffs; + std::array Delay; + float Gain; +}; + + +struct HrtfChannelState { + std::array mDelay{}; + BandSplitter mSplitter; + float mHfScale{}; + alignas(16) HrirArray mCoeffs{}; +}; + +#endif /* CORE_MIXER_HRTFDEFS_H */ -- cgit v1.2.3