#ifndef ALC_HRTF_H #define ALC_HRTF_H #include #include #include "AL/al.h" #include "AL/alc.h" #include "vector.h" #include "almalloc.h" #define HRTF_HISTORY_BITS (6) #define HRTF_HISTORY_LENGTH (1< Create(ALsizei num_chans); DEF_PLACE_NEWDEL() }; struct AngularPoint { ALfloat Elev; ALfloat Azim; }; al::vector EnumerateHrtf(const char *devname); HrtfEntry *GetLoadedHrtf(HrtfHandle *handle); void Hrtf_IncRef(HrtfEntry *hrtf); void Hrtf_DecRef(HrtfEntry *hrtf); void GetHrtfCoeffs(const HrtfEntry *Hrtf, ALfloat elevation, ALfloat azimuth, ALfloat spread, ALfloat (*RESTRICT coeffs)[2], ALsizei *delays); /** * Produces HRTF filter coefficients for decoding B-Format, given a set of * virtual speaker positions, a matching decoding matrix, and per-order high- * frequency gains for the decoder. The calculated impulse responses are * ordered and scaled according to the matrix input. Note the specified virtual * positions should be in degrees, not radians! */ void BuildBFormatHrtf(const HrtfEntry *Hrtf, DirectHrtfState *state, const ALsizei NumChannels, const AngularPoint *AmbiPoints, const ALfloat (*RESTRICT AmbiMatrix)[MAX_AMBI_COEFFS], const ALsizei AmbiCount, const ALfloat *RESTRICT AmbiOrderHFGain); #endif /* ALC_HRTF_H */