Combine some dry and wet path types
[openal-soft.git] / Alc / mixer_defs.h
blob2ade14f039fd5eca75f2bb0155bddbb6943af1f3
1 #ifndef MIXER_DEFS_H
2 #define MIXER_DEFS_H
4 #include "AL/alc.h"
5 #include "AL/al.h"
6 #include "alMain.h"
7 #include "alu.h"
9 struct MixGains;
11 struct HrtfParams;
12 struct HrtfState;
14 /* C resamplers */
15 const ALfloat *Resample_copy32_C(const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen);
16 const ALfloat *Resample_point32_C(const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen);
17 const ALfloat *Resample_lerp32_C(const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen);
18 const ALfloat *Resample_cubic32_C(const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen);
21 /* C mixers */
22 void MixDirect_Hrtf_C(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
23 ALuint Counter, ALuint Offset, ALuint OutPos, const ALuint IrSize,
24 const struct HrtfParams *hrtfparams, struct HrtfState *hrtfstate,
25 ALuint BufferSize);
26 void MixDirect_C(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
27 struct MixGains *Gains, ALuint Counter, ALuint OutPos,
28 ALuint BufferSize);
29 void MixSend_C(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
30 struct MixGains *Gain, ALuint Counter, ALuint OutPos,
31 ALuint BufferSize);
33 /* SSE mixers */
34 void MixDirect_Hrtf_SSE(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
35 ALuint Counter, ALuint Offset, ALuint OutPos, const ALuint IrSize,
36 const struct HrtfParams *hrtfparams, struct HrtfState *hrtfstate,
37 ALuint BufferSize);
38 void MixDirect_SSE(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
39 struct MixGains *Gains, ALuint Counter, ALuint OutPos,
40 ALuint BufferSize);
41 void MixSend_SSE(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
42 struct MixGains *Gain, ALuint Counter, ALuint OutPos,
43 ALuint BufferSize);
45 /* SSE resamplers */
46 inline void InitiatePositionArrays(ALuint frac, ALuint increment, ALuint *frac_arr, ALuint *pos_arr, ALuint size)
48 ALuint i;
50 pos_arr[0] = 0;
51 frac_arr[0] = frac;
52 for(i = 1;i < size;i++)
54 ALuint frac_tmp = frac_arr[i-1] + increment;
55 pos_arr[i] = pos_arr[i-1] + (frac_tmp>>FRACTIONBITS);
56 frac_arr[i] = frac_tmp&FRACTIONMASK;
60 const ALfloat *Resample_lerp32_SSE2(const ALfloat *src, ALuint frac, ALuint increment,
61 ALfloat *restrict dst, ALuint numsamples);
62 const ALfloat *Resample_lerp32_SSE41(const ALfloat *src, ALuint frac, ALuint increment,
63 ALfloat *restrict dst, ALuint numsamples);
65 /* Neon mixers */
66 void MixDirect_Hrtf_Neon(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
67 ALuint Counter, ALuint Offset, ALuint OutPos, const ALuint IrSize,
68 const struct HrtfParams *hrtfparams, struct HrtfState *hrtfstate,
69 ALuint BufferSize);
70 void MixDirect_Neon(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
71 struct MixGains *Gains, ALuint Counter, ALuint OutPos,
72 ALuint BufferSize);
73 void MixSend_Neon(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
74 struct MixGains *Gain, ALuint Counter, ALuint OutPos,
75 ALuint BufferSize);
77 #endif /* MIXER_DEFS_H */