Remove the separate surround51rear decoder option
[openal-soft.git] / Alc / hrtf.h
blob83cc64d1b1e949b644cb1d0c3ffd7294f63fe83d
1 #ifndef ALC_HRTF_H
2 #define ALC_HRTF_H
4 #include "AL/al.h"
5 #include "AL/alc.h"
7 #include "alMain.h"
8 #include "alstring.h"
11 struct Hrtf {
12 ALuint sampleRate;
13 ALsizei irSize;
14 ALubyte evCount;
16 const ALubyte *azCount;
17 const ALushort *evOffset;
18 const ALshort *coeffs;
19 const ALubyte *delays;
21 const char *filename;
22 struct Hrtf *next;
25 #define HRTFDELAY_BITS (20)
26 #define HRTFDELAY_FRACONE (1<<HRTFDELAY_BITS)
27 #define HRTFDELAY_MASK (HRTFDELAY_FRACONE-1)
29 /* The maximum number of virtual speakers used to generate HRTF coefficients
30 * for decoding B-Format.
32 #define HRTF_AMBI_MAX_CHANNELS 16
34 void FreeHrtfs(void);
36 vector_HrtfEntry EnumerateHrtf(const_al_string devname);
37 void FreeHrtfList(vector_HrtfEntry *list);
39 void GetHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth, ALfloat spread, ALfloat gain, ALfloat (*coeffs)[2], ALsizei *delays);
41 /**
42 * Produces HRTF filter coefficients for decoding B-Format, given a set of
43 * virtual speaker positions and HF/LF matrices for decoding to them. The
44 * returned coefficients are ordered and scaled according to the matrices.
45 * Returns the maximum impulse-response length of the generated coefficients.
47 ALsizei BuildBFormatHrtf(const struct Hrtf *Hrtf, ALfloat (*coeffs)[HRIR_LENGTH][2], ALsizei NumChannels, const ALfloat (*restrict AmbiPoints)[2], const ALfloat (*restrict AmbiMatrix)[2][MAX_AMBI_COEFFS], ALsizei AmbiCount);
49 #endif /* ALC_HRTF_H */