Update HRTF code
[openal-soft/openal-hmr.git] / Alc / mixer_c.c
blobfab13c0fd15c12a8997f32a8e2425445c9d39726
1 #include "config.h"
3 #include "AL/al.h"
4 #include "AL/alc.h"
5 #include "alMain.h"
6 #include "alu.h"
9 static __inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*RESTRICT Values)[2],
10 const ALuint IrSize,
11 ALfloat (*RESTRICT Coeffs)[2],
12 ALfloat (*RESTRICT CoeffStep)[2],
13 ALfloat left, ALfloat right)
15 ALuint c;
16 for(c = 0;c < IrSize;c++)
18 const ALuint off = (Offset+c)&HRIR_MASK;
19 Values[off][0] += Coeffs[c][0] * left;
20 Values[off][1] += Coeffs[c][1] * right;
21 Coeffs[c][0] += CoeffStep[c][0];
22 Coeffs[c][1] += CoeffStep[c][1];
26 static __inline void ApplyCoeffs(ALuint Offset, ALfloat (*RESTRICT Values)[2],
27 const ALuint IrSize,
28 ALfloat (*RESTRICT Coeffs)[2],
29 ALfloat left, ALfloat right)
31 ALuint c;
32 for(c = 0;c < IrSize;c++)
34 const ALuint off = (Offset+c)&HRIR_MASK;
35 Values[off][0] += Coeffs[c][0] * left;
36 Values[off][1] += Coeffs[c][1] * right;
41 #define SUFFIX C
42 #include "mixer_inc.c"
43 #undef SUFFIX