aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/hrtf.h
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/hrtf.h')
-rw-r--r--Alc/hrtf.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/Alc/hrtf.h b/Alc/hrtf.h
index 4fd774a7..aaee4a8d 100644
--- a/Alc/hrtf.h
+++ b/Alc/hrtf.h
@@ -15,6 +15,15 @@
#define HRTF_AMBI_MAX_CHANNELS 16
+#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)
+
+
struct HrtfEntry;
struct Hrtf {
@@ -33,6 +42,28 @@ struct Hrtf {
};
+typedef struct HrtfState {
+ alignas(16) ALfloat History[HRTF_HISTORY_LENGTH];
+ alignas(16) ALfloat Values[HRIR_LENGTH][2];
+} HrtfState;
+
+typedef struct HrtfParams {
+ alignas(16) ALfloat Coeffs[HRIR_LENGTH][2];
+ ALsizei Delay[2];
+ ALfloat Gain;
+} HrtfParams;
+
+typedef struct DirectHrtfState {
+ /* HRTF filter state for dry buffer content */
+ ALsizei Offset;
+ ALsizei IrSize;
+ struct {
+ alignas(16) ALfloat Values[HRIR_LENGTH][2];
+ alignas(16) ALfloat Coeffs[HRIR_LENGTH][2];
+ } Chan[];
+} DirectHrtfState;
+
+
void FreeHrtfs(void);
vector_EnumeratedHrtf EnumerateHrtf(const_al_string devname);