diff options
Diffstat (limited to 'Alc/mixer_defs.h')
-rw-r--r-- | Alc/mixer_defs.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Alc/mixer_defs.h b/Alc/mixer_defs.h index 94e0b24f..caa06c25 100644 --- a/Alc/mixer_defs.h +++ b/Alc/mixer_defs.h @@ -4,6 +4,7 @@ #include "AL/alc.h" #include "AL/al.h" #include "alMain.h" +#include "alu.h" struct MixGains; struct MixGainMono; @@ -43,6 +44,20 @@ void MixSend_SSE(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data, ALuint BufferSize); /* SSE resamplers */ +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; + } +} + 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, |