2014-02-23 21:11:01 -08:00
|
|
|
#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)
|
|
|
|
|
2014-06-20 16:43:14 -07:00
|
|
|
const struct Hrtf *GetHrtf(enum DevFmtChannels chans, ALCuint srate);
|
|
|
|
ALCboolean FindHrtfFormat(enum DevFmtChannels *chans, ALCuint *srate);
|
2014-02-23 21:11:01 -08:00
|
|
|
|
|
|
|
void FreeHrtfs(void);
|
|
|
|
|
|
|
|
ALuint GetHrtfIrSize(const struct Hrtf *Hrtf);
|
2014-11-23 10:49:54 -08:00
|
|
|
void GetLerpedHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth, ALfloat dirfact, ALfloat gain, ALfloat (*coeffs)[2], ALuint *delays);
|
|
|
|
ALuint GetMovingHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth, ALfloat dirfact, ALfloat gain, ALfloat delta, ALint counter, ALfloat (*coeffs)[2], ALuint *delays, ALfloat (*coeffStep)[2], ALint *delayStep);
|
2015-02-10 11:22:28 -08:00
|
|
|
void GetBFormatHrtfCoeffs(const struct Hrtf *Hrtf, const ALuint num_chans, ALfloat (**coeffs_list)[2], ALuint **delay_list);
|
2014-02-23 21:11:01 -08:00
|
|
|
|
|
|
|
#endif /* ALC_HRTF_H */
|