Pas the output device channel count to ALeffectState::process
[openal-soft.git] / Alc / hrtf.h
blob938bf55286ba1b4c0dc53e71c3c9f418c34bb9d7
1 #ifndef ALC_HRTF_H
2 #define ALC_HRTF_H
4 #include "AL/al.h"
5 #include "AL/alc.h"
7 enum DevFmtChannels;
9 struct Hrtf;
11 #define HRIR_BITS (7)
12 #define HRIR_LENGTH (1<<HRIR_BITS)
13 #define HRIR_MASK (HRIR_LENGTH-1)
14 #define HRTFDELAY_BITS (20)
15 #define HRTFDELAY_FRACONE (1<<HRTFDELAY_BITS)
16 #define HRTFDELAY_MASK (HRTFDELAY_FRACONE-1)
18 const struct Hrtf *GetHrtf(enum DevFmtChannels chans, ALCuint srate);
19 ALCboolean FindHrtfFormat(enum DevFmtChannels *chans, ALCuint *srate);
21 void FreeHrtfs(void);
23 ALuint GetHrtfIrSize(const struct Hrtf *Hrtf);
24 ALfloat CalcHrtfDelta(ALfloat oldGain, ALfloat newGain, const ALfloat olddir[3], const ALfloat newdir[3]);
25 void GetLerpedHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth, ALfloat dirfact, ALfloat gain, ALfloat (*coeffs)[2], ALuint *delays);
26 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);
28 #endif /* ALC_HRTF_H */