aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-09-18 09:52:40 -0700
committerChris Robinson <[email protected]>2011-09-18 09:52:40 -0700
commit25f7c2704382221c9d563a7c1e57c02252eb3dad (patch)
treecbc1a5826fc368ac880a3e7baa1f6805ed21e9d3 /OpenAL32
parentec3b78e52d95752160231bc8eb5ad9647e20b3b9 (diff)
Store the HRTF tables used in the device
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 40b90383..a5a96e81 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -384,6 +384,9 @@ extern "C" {
#define LOWPASSFREQCUTOFF (5000)
+struct Hrtf;
+
+
// Find the next power-of-2 for non-power-of-2 numbers.
static __inline ALuint NextPowerOf2(ALuint value)
{
@@ -549,6 +552,9 @@ struct ALCdevice_struct
// Map of Filters for this device
UIntMap FilterMap;
+ /* HRTF filter tables */
+ const struct Hrtf *Hrtf;
+
// Stereo-to-binaural filter
struct bs2b *Bs2b;
ALCint Bs2bLevel;
@@ -679,10 +685,10 @@ const ALCchar *DevFmtChannelsString(enum DevFmtChannels chans);
#define HRIR_LENGTH (1<<HRIR_BITS)
#define HRIR_MASK (HRIR_LENGTH-1)
void InitHrtf(void);
-ALCboolean IsHrtfCompatible(ALCdevice *device);
+const struct Hrtf *GetHrtf(ALCdevice *device);
ALfloat CalcHrtfDelta(ALfloat oldGain, ALfloat newGain, const ALfloat olddir[3], const ALfloat newdir[3]);
-void GetLerpedHrtfCoeffs(ALfloat elevation, ALfloat azimuth, ALfloat gain, ALfloat (*coeffs)[2], ALuint *delays);
-ALuint GetMovingHrtfCoeffs(ALfloat elevation, ALfloat azimuth, ALfloat gain, ALfloat delta, ALint counter, ALfloat (*coeffs)[2], ALuint *delays, ALfloat (*coeffStep)[2], ALint *delayStep);
+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);
void al_print(const char *func, const char *fmt, ...) PRINTF_STYLE(2,3);
#define AL_PRINT(...) al_print(__FUNCTION__, __VA_ARGS__)