12 #define HRTFDELAY_BITS (20)
13 #define HRTFDELAY_FRACONE (1<<HRTFDELAY_BITS)
14 #define HRTFDELAY_MASK (HRTFDELAY_FRACONE-1)
16 /* The maximum number of virtual speakers used to generate HRTF coefficients
17 * for decoding B-Format.
19 #define HRTF_AMBI_MAX_CHANNELS 16
31 const ALubyte
*azCount
;
32 const ALushort
*evOffset
;
33 const ALfloat (*coeffs
)[2];
34 const ALubyte (*delays
)[2];
40 vector_EnumeratedHrtf
EnumerateHrtf(const_al_string devname
);
41 void FreeHrtfList(vector_EnumeratedHrtf
*list
);
42 struct Hrtf
*GetLoadedHrtf(struct HrtfEntry
*entry
);
43 void Hrtf_IncRef(struct Hrtf
*hrtf
);
44 void Hrtf_DecRef(struct Hrtf
*hrtf
);
46 void GetHrtfCoeffs(const struct Hrtf
*Hrtf
, ALfloat elevation
, ALfloat azimuth
, ALfloat spread
, ALfloat (*coeffs
)[2], ALsizei
*delays
);
49 * Produces HRTF filter coefficients for decoding B-Format, given a set of
50 * virtual speaker positions and HF/LF matrices for decoding to them. The
51 * returned coefficients are ordered and scaled according to the matrices.
52 * Returns the maximum impulse-response length of the generated coefficients.
54 ALsizei
BuildBFormatHrtf(const struct Hrtf
*Hrtf
, DirectHrtfState
*state
, ALsizei NumChannels
, const ALfloat (*restrict AmbiPoints
)[2], const ALfloat (*restrict AmbiMatrix
)[2][MAX_AMBI_COEFFS
], ALsizei AmbiCount
);
56 #endif /* ALC_HRTF_H */