2012-08-15 01:01:55 -07:00
|
|
|
#ifndef MIXER_DEFS_H
|
|
|
|
#define MIXER_DEFS_H
|
|
|
|
|
|
|
|
#include "AL/alc.h"
|
|
|
|
#include "AL/al.h"
|
|
|
|
#include "alMain.h"
|
2014-06-06 01:52:53 -07:00
|
|
|
#include "alu.h"
|
2012-08-15 01:01:55 -07:00
|
|
|
|
2014-05-18 10:24:07 -07:00
|
|
|
struct MixGains;
|
|
|
|
|
2014-05-18 09:31:08 -07:00
|
|
|
struct HrtfParams;
|
|
|
|
struct HrtfState;
|
|
|
|
|
2012-09-14 04:13:18 -07:00
|
|
|
/* C resamplers */
|
2014-05-19 05:46:01 -07:00
|
|
|
const ALfloat *Resample_copy32_C(const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen);
|
|
|
|
const ALfloat *Resample_point32_C(const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen);
|
|
|
|
const ALfloat *Resample_lerp32_C(const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen);
|
|
|
|
const ALfloat *Resample_cubic32_C(const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen);
|
2012-09-14 04:13:18 -07:00
|
|
|
|
|
|
|
|
2012-08-15 01:01:55 -07:00
|
|
|
/* C mixers */
|
2014-05-18 09:31:08 -07:00
|
|
|
void MixDirect_Hrtf_C(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
|
2014-05-18 11:05:38 -07:00
|
|
|
ALuint Counter, ALuint Offset, ALuint OutPos, const ALuint IrSize,
|
2014-05-18 09:31:08 -07:00
|
|
|
const struct HrtfParams *hrtfparams, struct HrtfState *hrtfstate,
|
2014-05-18 11:05:38 -07:00
|
|
|
ALuint BufferSize);
|
2014-05-18 10:24:07 -07:00
|
|
|
void MixDirect_C(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
|
|
|
|
struct MixGains *Gains, ALuint Counter, ALuint OutPos,
|
|
|
|
ALuint BufferSize);
|
2014-05-18 10:35:11 -07:00
|
|
|
void MixSend_C(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
|
2014-06-13 11:42:04 -07:00
|
|
|
struct MixGains *Gain, ALuint Counter, ALuint OutPos,
|
2014-05-18 10:35:11 -07:00
|
|
|
ALuint BufferSize);
|
2012-08-15 01:01:55 -07:00
|
|
|
|
|
|
|
/* SSE mixers */
|
2014-05-18 09:31:08 -07:00
|
|
|
void MixDirect_Hrtf_SSE(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
|
2014-05-18 11:05:38 -07:00
|
|
|
ALuint Counter, ALuint Offset, ALuint OutPos, const ALuint IrSize,
|
2014-05-18 09:31:08 -07:00
|
|
|
const struct HrtfParams *hrtfparams, struct HrtfState *hrtfstate,
|
2014-05-18 11:05:38 -07:00
|
|
|
ALuint BufferSize);
|
2014-05-18 10:24:07 -07:00
|
|
|
void MixDirect_SSE(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
|
|
|
|
struct MixGains *Gains, ALuint Counter, ALuint OutPos,
|
|
|
|
ALuint BufferSize);
|
2014-05-18 10:35:11 -07:00
|
|
|
void MixSend_SSE(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
|
2014-06-13 11:42:04 -07:00
|
|
|
struct MixGains *Gain, ALuint Counter, ALuint OutPos,
|
2014-05-18 10:35:11 -07:00
|
|
|
ALuint BufferSize);
|
2012-08-15 01:01:55 -07:00
|
|
|
|
2014-06-04 02:57:13 -07:00
|
|
|
/* SSE resamplers */
|
2014-06-06 01:52:53 -07:00
|
|
|
inline void InitiatePositionArrays(ALuint frac, ALuint increment, ALuint *frac_arr, ALuint *pos_arr, ALuint size)
|
|
|
|
{
|
|
|
|
ALuint i;
|
|
|
|
|
|
|
|
pos_arr[0] = 0;
|
|
|
|
frac_arr[0] = frac;
|
|
|
|
for(i = 1;i < size;i++)
|
|
|
|
{
|
|
|
|
ALuint frac_tmp = frac_arr[i-1] + increment;
|
|
|
|
pos_arr[i] = pos_arr[i-1] + (frac_tmp>>FRACTIONBITS);
|
|
|
|
frac_arr[i] = frac_tmp&FRACTIONMASK;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-04 02:57:13 -07:00
|
|
|
const ALfloat *Resample_lerp32_SSE2(const ALfloat *src, ALuint frac, ALuint increment,
|
|
|
|
ALfloat *restrict dst, ALuint numsamples);
|
|
|
|
const ALfloat *Resample_lerp32_SSE41(const ALfloat *src, ALuint frac, ALuint increment,
|
|
|
|
ALfloat *restrict dst, ALuint numsamples);
|
|
|
|
|
2012-08-15 01:01:55 -07:00
|
|
|
/* Neon mixers */
|
2014-05-18 09:31:08 -07:00
|
|
|
void MixDirect_Hrtf_Neon(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
|
2014-05-18 11:05:38 -07:00
|
|
|
ALuint Counter, ALuint Offset, ALuint OutPos, const ALuint IrSize,
|
2014-05-18 09:31:08 -07:00
|
|
|
const struct HrtfParams *hrtfparams, struct HrtfState *hrtfstate,
|
2014-05-18 11:05:38 -07:00
|
|
|
ALuint BufferSize);
|
2014-05-18 10:24:07 -07:00
|
|
|
void MixDirect_Neon(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
|
|
|
|
struct MixGains *Gains, ALuint Counter, ALuint OutPos,
|
|
|
|
ALuint BufferSize);
|
2014-05-18 10:35:11 -07:00
|
|
|
void MixSend_Neon(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
|
2014-06-13 11:42:04 -07:00
|
|
|
struct MixGains *Gain, ALuint Counter, ALuint OutPos,
|
2014-05-18 10:35:11 -07:00
|
|
|
ALuint BufferSize);
|
2012-08-15 01:01:55 -07:00
|
|
|
|
|
|
|
#endif /* MIXER_DEFS_H */
|