diff options
author | Chris Robinson <[email protected]> | 2011-06-25 21:39:36 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-06-25 21:39:36 -0700 |
commit | 212b187447c6b095de3629448d3a2270c09cf119 (patch) | |
tree | 61ea80069c4588c7ea054899042d714890aeb14c /Alc/hrtf.c | |
parent | ac9a6e891fb26c8c41774be6f90c7a96f85d1942 (diff) |
Add a function to check if a device is compatible with the Hrtf filter
Diffstat (limited to 'Alc/hrtf.c')
-rw-r--r-- | Alc/hrtf.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -27,6 +27,7 @@ #define HRIR_COUNT 828 +static const ALuint sampleRate = 44100; static const ALubyte evCount = 19; static const ALushort evOffset[19] = { 0, 1, 13, 37, 73, 118, 174, 234, 306, 378, 450, 522, 594, 654, 710, 755, 791, 815, 827 }; static const ALubyte azCount[19] = { 1, 12, 24, 36, 45, 56, 60, 72, 72, 72, 72, 72, 60, 56, 45, 36, 24, 12, 1 }; @@ -68,6 +69,13 @@ void GetHrtfCoeffs(ALfloat elevation, ALfloat angle, const ALshort **left, const *right = Hrtf.coeffs[ridx]; } +ALCboolean IsHrtfCompatible(ALCdevice *device) +{ + if(device->FmtChans == DevFmtStereo && device->Frequency == sampleRate) + return ALC_TRUE; + return ALC_FALSE; +} + void InitHrtf(void) { const char *str; |