8 #define LIKELY(x) __builtin_expect(!!(x), 1)
9 #define UNLIKELY(x) __builtin_expect(!!(x), 0)
12 #define UNLIKELY(x) (x)
15 #define REAL_MERGE2(a,b) a##b
16 #define MERGE2(a,b) REAL_MERGE2(a,b)
18 #define MixDirect_Hrtf MERGE2(MixDirect_Hrtf_,SUFFIX)
24 const ALfloat (*RESTRICT CoeffStep)[2],
54 for(c = 0;c < IrSize;c++)
56 Coeffs[
c][0] = TargetCoeffs[
c][0] - (CoeffStep[
c][0]*Counter);
57 Coeffs[
c][1] = TargetCoeffs[
c][1] - (CoeffStep[
c][1]*Counter);
60 Delay[0] = TargetDelay[0] - (DelayStep[0]*Counter);
61 Delay[1] = TargetDelay[1] - (DelayStep[1]*Counter);
78 for(pos = 0;pos < BufferSize && Counter > 0;pos++)
88 Delay[0] += DelayStep[0];
89 Delay[1] += DelayStep[1];
95 ApplyCoeffsStep(Offset, Values, IrSize, Coeffs, CoeffStep, left, right);
105 for(;pos < BufferSize;pos++)
115 ApplyCoeffs(Offset, Values, IrSize, Coeffs, left, right);
121 if(
LIKELY(OutPos == SamplesToDo))
130 Coeffs[0][1] * right;
135 #undef MixDirect_Hrtf
ALfloat(* OutBuffer)[BUFFERSIZE]
static __inline ALfloat lerp(ALfloat val1, ALfloat val2, ALfloat mu)
ALuint Delay[MaxChannels][2]
static __inline void ApplyCoeffs(ALuint Offset, ALfloat(*RESTRICT Values)[2], const ALuint irSize, ALfloat(*RESTRICT Coeffs)[2], ALfloat left, ALfloat right)
#define HRTFDELAY_FRACONE
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static __inline void ApplyCoeffsStep(ALuint Offset, ALfloat(*RESTRICT Values)[2], const ALuint irSize, ALfloat(*RESTRICT Coeffs)[2], const ALfloat(*RESTRICT CoeffStep)[2], ALfloat left, ALfloat right)
struct DirectParams::@60 Hrtf
static __inline ALuint maxu(ALuint a, ALuint b)