Add wrapper methods to ensure aligned allocations
[openal-soft/openal-hmr.git] / Alc / mixer_c.c
blobf59b3190a5d2520296a689b3dd3be0a2a398b862
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 ApplyCoeffs(ALuint Offset, ALfloat (*RESTRICT Values)[2],
10 ALfloat (*RESTRICT Coeffs)[2],
11 ALfloat left, ALfloat right)
13 ALuint c;
14 for(c = 0;c < HRIR_LENGTH;c++)
16 const ALuint off = (Offset+c)&HRIR_MASK;
17 Values[off][0] += Coeffs[c][0] * left;
18 Values[off][1] += Coeffs[c][1] * right;
22 #define SUFFIX C
23 #define SAMPLER point32
24 #include "mixer_inc.c"
25 #undef SAMPLER
26 #define SAMPLER lerp32
27 #include "mixer_inc.c"
28 #undef SAMPLER
29 #define SAMPLER cubic32
30 #include "mixer_inc.c"
31 #undef SAMPLER
32 #undef SUFFIX