aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c1
-rw-r--r--Alc/hrtf.c1
-rw-r--r--Alc/hrtf.h28
-rw-r--r--Alc/mixer_inc.c1
4 files changed, 31 insertions, 0 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index fd8065ed..5e1965f9 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -33,6 +33,7 @@
#include "alAuxEffectSlot.h"
#include "alu.h"
#include "bs2b.h"
+#include "hrtf.h"
#include "mixer_defs.h"
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index 08a63f3c..d1448d5c 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -41,6 +41,7 @@
#include "alMain.h"
#include "alSource.h"
#include "alu.h"
+#include "hrtf.h"
#ifndef PATH_MAX
diff --git a/Alc/hrtf.h b/Alc/hrtf.h
new file mode 100644
index 00000000..d9022d02
--- /dev/null
+++ b/Alc/hrtf.h
@@ -0,0 +1,28 @@
+#ifndef ALC_HRTF_H
+#define ALC_HRTF_H
+
+#include "AL/al.h"
+#include "AL/alc.h"
+
+enum DevFmtChannels;
+
+struct Hrtf;
+
+#define HRIR_BITS (7)
+#define HRIR_LENGTH (1<<HRIR_BITS)
+#define HRIR_MASK (HRIR_LENGTH-1)
+#define HRTFDELAY_BITS (20)
+#define HRTFDELAY_FRACONE (1<<HRTFDELAY_BITS)
+#define HRTFDELAY_MASK (HRTFDELAY_FRACONE-1)
+
+const struct Hrtf *GetHrtf(ALCdevice *device);
+ALCboolean FindHrtfFormat(const ALCdevice *device, enum DevFmtChannels *chans, ALCuint *srate);
+
+void FreeHrtfs(void);
+
+ALuint GetHrtfIrSize(const struct Hrtf *Hrtf);
+ALfloat CalcHrtfDelta(ALfloat oldGain, ALfloat newGain, const ALfloat olddir[3], const ALfloat newdir[3]);
+void GetLerpedHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth, ALfloat gain, ALfloat (*coeffs)[2], ALuint *delays);
+ALuint GetMovingHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth, ALfloat gain, ALfloat delta, ALint counter, ALfloat (*coeffs)[2], ALuint *delays, ALfloat (*coeffStep)[2], ALint *delayStep);
+
+#endif /* ALC_HRTF_H */
diff --git a/Alc/mixer_inc.c b/Alc/mixer_inc.c
index 17be5cde..08a7b264 100644
--- a/Alc/mixer_inc.c
+++ b/Alc/mixer_inc.c
@@ -2,6 +2,7 @@
#include "alMain.h"
#include "alSource.h"
+#include "hrtf.h"
#include "mixer_defs.h"
#ifdef __GNUC__