aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-01-18 19:16:24 -0800
committerChris Robinson <[email protected]>2017-01-18 19:16:24 -0800
commitaa56af1ecbf30b9f41d1cf9b0ede1c50f5757639 (patch)
tree99511fda64821eb0b92353077a006e069dfc27a3 /OpenAL32/Include
parente8ac0e5bfd659a88538abed66e13e52b40f3ad12 (diff)
Move the B-Format HRTF virtual speaker stuff to InitHrtfPanning
This keeps the decoder matrices and coefficient mapping together for if it changes in the future.
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alMain.h32
1 files changed, 20 insertions, 12 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index fd90a49a..1fb1dcf5 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -20,16 +20,6 @@
#include "AL/alc.h"
#include "AL/alext.h"
-
-#if defined(_WIN64)
-#define SZFMT "%I64u"
-#elif defined(_WIN32)
-#define SZFMT "%u"
-#else
-#define SZFMT "%zu"
-#endif
-
-
#include "static_assert.h"
#include "align.h"
#include "atomic.h"
@@ -39,8 +29,6 @@
#include "almalloc.h"
#include "threads.h"
-#include "hrtf.h"
-
#ifndef ALC_SOFT_device_clock
#define ALC_SOFT_device_clock 1
typedef int64_t ALCint64SOFT;
@@ -128,6 +116,15 @@ AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum format);
#endif
+#if defined(_WIN64)
+#define SZFMT "%I64u"
+#elif defined(_WIN32)
+#define SZFMT "%u"
+#else
+#define SZFMT "%zu"
+#endif
+
+
#ifdef __GNUC__
/* Because of a long-standing deficiency in C, you're not allowed to implicitly
* cast a pointer-to-type-array to a pointer-to-const-type-array. For example,
@@ -577,6 +574,10 @@ typedef union AmbiConfig {
#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];
@@ -587,6 +588,13 @@ typedef struct HrtfParams {
ALsizei Delay[2];
} HrtfParams;
+typedef struct HrtfEntry {
+ al_string name;
+
+ const struct Hrtf *hrtf;
+} HrtfEntry;
+TYPEDEF_VECTOR(HrtfEntry, vector_HrtfEntry)
+
/* Size for temporary storage of buffer data, in ALfloats. Larger values need
* more memory, while smaller values may need more iterations. The value needs