12 {
return vals[0]; (
void)frac; }
26 #define DECL_TEMPLATE(Sampler) \
27 void Resample_##Sampler##_C(const ALfloat *data, ALuint frac, \
28 ALuint increment, ALfloat *RESTRICT OutBuffer, ALuint BufferSize) \
33 for(i = 0;i < BufferSize+1;i++) \
35 OutBuffer[i] = Sampler(data + pos, frac); \
38 pos += frac>>FRACTIONBITS; \
39 frac &= FRACTIONMASK; \
53 const ALfloat (*RESTRICT CoeffStep)[2],
57 for(c = 0;c < IrSize;c++)
60 Values[off][0] += Coeffs[
c][0] *
left;
61 Values[off][1] += Coeffs[
c][1] *
right;
62 Coeffs[
c][0] += CoeffStep[
c][0];
63 Coeffs[
c][1] += CoeffStep[
c][1];
73 for(c = 0;c < IrSize;c++)
76 Values[off][0] += Coeffs[
c][0] *
left;
77 Values[off][1] += Coeffs[
c][1] *
right;
98 DrySend = params->
Gains[srcchan][
c];
99 if(DrySend < 0.00001
f)
103 ClickRemoval[
c] -= data[0]*DrySend;
104 for(pos = 0;pos < BufferSize;pos++)
105 DryBuffer[c][OutPos+pos] += data[pos]*DrySend;
106 if(OutPos+pos == SamplesToDo)
107 PendingClicks[
c] += data[pos]*DrySend;
122 if(WetSend < 0.00001
f)
126 WetClickRemoval[0] -= data[0] * WetSend;
127 for(pos = 0;pos < BufferSize;pos++)
128 WetBuffer[0][OutPos+pos] += data[pos] * WetSend;
129 if(OutPos+pos == SamplesToDo)
130 WetPendingClicks[0] += data[pos] * WetSend;
ALfloat(* OutBuffer)[BUFFERSIZE]
static __inline ALfloat point32(const ALfloat *vals, ALuint frac)
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
static __inline ALfloat lerp(ALfloat val1, ALfloat val2, ALfloat mu)
#define DECL_TEMPLATE(Sampler)
static __inline ALfloat cubic(ALfloat val0, ALfloat val1, ALfloat val2, ALfloat val3, ALfloat mu)
static __inline void ApplyCoeffsStep(ALuint Offset, ALfloat(*RESTRICT Values)[2], const ALuint IrSize, ALfloat(*RESTRICT Coeffs)[2], const ALfloat(*RESTRICT CoeffStep)[2], ALfloat left, ALfloat right)
static __inline ALfloat lerp32(const ALfloat *vals, ALuint frac)
struct ALeffectslot * Slot
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static __inline void ApplyCoeffs(ALuint Offset, ALfloat(*RESTRICT Values)[2], const ALuint IrSize, ALfloat(*RESTRICT Coeffs)[2], ALfloat left, ALfloat right)
void MixSend_C(const SendParams *params, const ALfloat *RESTRICT data, ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
ALfloat Gains[MaxChannels][MaxChannels]
void MixDirect_C(const DirectParams *params, const ALfloat *RESTRICT data, ALuint srcchan, ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
static __inline ALfloat cubic32(const ALfloat *vals, ALuint frac)
void Resample_copy32_C(const ALfloat *data, ALuint frac, ALuint increment, ALfloat *RESTRICT OutBuffer, ALuint BufferSize)