aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-11 03:53:25 -0800
committerChris Robinson <[email protected]>2018-01-11 03:53:25 -0800
commit2c8e4467c3671aa0e5d77bbada1296ad1c44e624 (patch)
tree22517652a4c189290f52966b09ce61fe00fb5556
parent15f9d15ba006fab67a3ace8b2560c3397e75b1aa (diff)
Move some HRTF structures to hrtf.h
-rw-r--r--Alc/hrtf.h31
-rw-r--r--OpenAL32/Include/alMain.h32
2 files changed, 33 insertions, 30 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);
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 52f409ac..617b5a64 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -386,6 +386,7 @@ extern "C" {
struct Hrtf;
struct HrtfEntry;
+struct DirectHrtfState;
struct FrontStablizer;
struct Compressor;
struct ALcontextProps;
@@ -625,35 +626,6 @@ typedef union AmbiConfig {
} AmbiConfig;
-#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)
-
-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;
-
typedef struct EnumeratedHrtf {
al_string name;
@@ -750,7 +722,7 @@ struct ALCdevice_struct
UIntMap FilterMap;
/* HRTF state and info */
- DirectHrtfState *Hrtf;
+ struct DirectHrtfState *Hrtf;
al_string HrtfName;
struct Hrtf *HrtfHandle;
vector_EnumeratedHrtf HrtfList;