diff options
author | Chris Robinson <[email protected]> | 2020-12-12 14:15:17 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-12-12 14:15:17 -0800 |
commit | 1ad944555c36620f901d13be04e3eacc7e8dcee0 (patch) | |
tree | 2c13fffec9aa6b509b22157f9b16facb39eef05a /alc/hrtf.h | |
parent | 176bc8a8354fe3b79c6a109d61c1e3e79898dfe6 (diff) |
Move some HRTF definitions to a separate header
Diffstat (limited to 'alc/hrtf.h')
-rw-r--r-- | alc/hrtf.h | 33 |
1 files changed, 2 insertions, 31 deletions
@@ -13,26 +13,10 @@ #include "core/bufferline.h" #include "core/filters/splitter.h" #include "intrusive_ptr.h" +#include "mixer/hrtfdefs.h" #include "vector.h" -#define HRTF_HISTORY_BITS 6 -#define HRTF_HISTORY_LENGTH (1<<HRTF_HISTORY_BITS) -#define HRTF_HISTORY_MASK (HRTF_HISTORY_LENGTH-1) - -#define HRIR_BITS 7 -#define HRIR_LENGTH (1<<HRIR_BITS) -#define HRIR_MASK (HRIR_LENGTH-1) - -#define MIN_IR_LENGTH 8 - -using float2 = std::array<float,2>; -using HrirArray = std::array<float2,HRIR_LENGTH>; -using ubyte = unsigned char; -using ubyte2 = std::array<ubyte,2>; -using ushort = unsigned short; -using uint = unsigned int; - struct HrtfStore { RefCount mRef; @@ -65,13 +49,6 @@ struct HrtfStore { using HrtfStorePtr = al::intrusive_ptr<HrtfStore>; -struct HrtfFilter { - alignas(16) HrirArray Coeffs; - std::array<uint,2> Delay; - float Gain; -}; - - struct EvRadians { float value; }; struct AzRadians { float value; }; struct AngularPoint { @@ -79,13 +56,7 @@ struct AngularPoint { AzRadians Azim; }; -#define HRTF_DIRECT_DELAY 192 -struct HrtfChannelState { - std::array<float,HRTF_DIRECT_DELAY> mDelay{}; - BandSplitter mSplitter; - float mHfScale{}; - alignas(16) HrirArray mCoeffs{}; -}; + struct DirectHrtfState { std::array<float,HRTF_DIRECT_DELAY+BufferLineSize> mTemp; |