Constify the direct and send parameters given to the mixer

This commit is contained in:
Chris Robinson 2012-10-15 01:31:58 -07:00
parent fe1903fb56
commit a14383d6cc
6 changed files with 21 additions and 21 deletions

View File

@ -50,7 +50,7 @@ DECL_TEMPLATE(cubic32)
static __inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*RESTRICT Values)[2],
const ALuint IrSize,
ALfloat (*RESTRICT Coeffs)[2],
ALfloat (*RESTRICT CoeffStep)[2],
const ALfloat (*RESTRICT CoeffStep)[2],
ALfloat left, ALfloat right)
{
ALuint c;
@ -83,7 +83,7 @@ static __inline void ApplyCoeffs(ALuint Offset, ALfloat (*RESTRICT Values)[2],
#undef SUFFIX
void MixDirect_C(DirectParams *params, const ALfloat *RESTRICT data, ALuint srcchan,
void MixDirect_C(const DirectParams *params, const ALfloat *RESTRICT data, ALuint srcchan,
ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
{
ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE] = params->OutBuffer;
@ -109,7 +109,7 @@ void MixDirect_C(DirectParams *params, const ALfloat *RESTRICT data, ALuint srcc
}
void MixSend_C(SendParams *params, const ALfloat *RESTRICT data,
void MixSend_C(const SendParams *params, const ALfloat *RESTRICT data,
ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
{
ALeffectslot *Slot = params->Slot;

View File

@ -16,16 +16,16 @@ void Resample_cubic32_C(const ALfloat *src, ALuint frac, ALuint increment, ALflo
/* C mixers */
void MixDirect_Hrtf_C(struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
void MixDirect_C(struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
void MixSend_C(struct SendParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint);
void MixDirect_Hrtf_C(const struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
void MixDirect_C(const struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
void MixSend_C(const struct SendParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint);
/* SSE mixers */
void MixDirect_Hrtf_SSE(struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
void MixDirect_SSE(struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
void MixSend_SSE(struct SendParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint);
void MixDirect_Hrtf_SSE(const struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
void MixDirect_SSE(const struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
void MixSend_SSE(const struct SendParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint);
/* Neon mixers */
void MixDirect_Hrtf_Neon(struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
void MixDirect_Hrtf_Neon(const struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
#endif /* MIXER_DEFS_H */

View File

@ -21,7 +21,7 @@
static __inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*RESTRICT Values)[2],
const ALuint irSize,
ALfloat (*RESTRICT Coeffs)[2],
ALfloat (*RESTRICT CoeffStep)[2],
const ALfloat (*RESTRICT CoeffStep)[2],
ALfloat left, ALfloat right);
static __inline void ApplyCoeffs(ALuint Offset, ALfloat (*RESTRICT Values)[2],
const ALuint irSize,
@ -29,7 +29,7 @@ static __inline void ApplyCoeffs(ALuint Offset, ALfloat (*RESTRICT Values)[2],
ALfloat left, ALfloat right);
void MixDirect_Hrtf(DirectParams *params, const ALfloat *RESTRICT data, ALuint srcchan,
void MixDirect_Hrtf(const DirectParams *params, const ALfloat *RESTRICT data, ALuint srcchan,
ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
{
ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE] = params->OutBuffer;
@ -37,9 +37,9 @@ void MixDirect_Hrtf(DirectParams *params, const ALfloat *RESTRICT data, ALuint s
ALfloat *RESTRICT PendingClicks = params->PendingClicks;
const ALuint IrSize = params->Hrtf.IrSize;
const ALint *RESTRICT DelayStep = params->Hrtf.DelayStep;
ALfloat (*RESTRICT CoeffStep)[2] = params->Hrtf.CoeffStep;
ALfloat (*RESTRICT TargetCoeffs)[2] = params->Hrtf.Coeffs[srcchan];
ALuint *RESTRICT TargetDelay = params->Hrtf.Delay[srcchan];
const ALfloat (*RESTRICT CoeffStep)[2] = params->Hrtf.CoeffStep;
const ALfloat (*RESTRICT TargetCoeffs)[2] = params->Hrtf.Coeffs[srcchan];
const ALuint *RESTRICT TargetDelay = params->Hrtf.Delay[srcchan];
ALfloat *RESTRICT History = params->hrtfState->History[srcchan];
ALfloat (*RESTRICT Values)[2] = params->hrtfState->Values[srcchan];
ALint Counter = maxu(params->hrtfState->Counter, OutPos) - OutPos;

View File

@ -13,7 +13,7 @@
static __inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*RESTRICT Values)[2],
const ALuint IrSize,
ALfloat (*RESTRICT Coeffs)[2],
ALfloat (*RESTRICT CoeffStep)[2],
const ALfloat (*RESTRICT CoeffStep)[2],
ALfloat left, ALfloat right)
{
ALuint c;

View File

@ -17,7 +17,7 @@
static __inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*RESTRICT Values)[2],
const ALuint IrSize,
ALfloat (*RESTRICT Coeffs)[2],
ALfloat (*RESTRICT CoeffStep)[2],
const ALfloat (*RESTRICT CoeffStep)[2],
ALfloat left, ALfloat right)
{
const __m128 lrlr = { left, right, left, right };
@ -133,7 +133,7 @@ static __inline void ApplyCoeffs(ALuint Offset, ALfloat (*RESTRICT Values)[2],
#undef SUFFIX
void MixDirect_SSE(DirectParams *params, const ALfloat *RESTRICT data, ALuint srcchan,
void MixDirect_SSE(const DirectParams *params, const ALfloat *RESTRICT data, ALuint srcchan,
ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
{
ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE] = params->OutBuffer;
@ -171,7 +171,7 @@ void MixDirect_SSE(DirectParams *params, const ALfloat *RESTRICT data, ALuint sr
}
void MixSend_SSE(SendParams *params, const ALfloat *RESTRICT data,
void MixSend_SSE(const SendParams *params, const ALfloat *RESTRICT data,
ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
{
ALeffectslot *Slot = params->Slot;

View File

@ -88,11 +88,11 @@ struct SendParams;
typedef void (*ResamplerFunc)(const ALfloat *src, ALuint frac, ALuint increment,
ALfloat *RESTRICT dst, ALuint dstlen);
typedef ALvoid (*DryMixerFunc)(struct DirectParams *params,
typedef ALvoid (*DryMixerFunc)(const struct DirectParams *params,
const ALfloat *RESTRICT data, ALuint srcchan,
ALuint OutPos, ALuint SamplesToDo,
ALuint BufferSize);
typedef ALvoid (*WetMixerFunc)(struct SendParams *params,
typedef ALvoid (*WetMixerFunc)(const struct SendParams *params,
const ALfloat *RESTRICT data,
ALuint OutPos, ALuint SamplesToDo,
ALuint BufferSize);