From a14383d6ccd3f5e373ed3576c8fd2adce27a4597 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 15 Oct 2012 01:31:58 -0700 Subject: Constify the direct and send parameters given to the mixer --- Alc/mixer_c.c | 6 +++--- Alc/mixer_defs.h | 14 +++++++------- Alc/mixer_inc.c | 10 +++++----- Alc/mixer_neon.c | 2 +- Alc/mixer_sse.c | 6 +++--- OpenAL32/Include/alu.h | 4 ++-- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Alc/mixer_c.c b/Alc/mixer_c.c index 9283c8e9..d9c8ca25 100644 --- a/Alc/mixer_c.c +++ b/Alc/mixer_c.c @@ -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; diff --git a/Alc/mixer_defs.h b/Alc/mixer_defs.h index 1f9bc0b4..6d3390c8 100644 --- a/Alc/mixer_defs.h +++ b/Alc/mixer_defs.h @@ -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 */ diff --git a/Alc/mixer_inc.c b/Alc/mixer_inc.c index 9bbc8fee..e836db45 100644 --- a/Alc/mixer_inc.c +++ b/Alc/mixer_inc.c @@ -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; diff --git a/Alc/mixer_neon.c b/Alc/mixer_neon.c index 0dedb885..23dc792c 100644 --- a/Alc/mixer_neon.c +++ b/Alc/mixer_neon.c @@ -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; diff --git a/Alc/mixer_sse.c b/Alc/mixer_sse.c index deff3232..540a0d72 100644 --- a/Alc/mixer_sse.c +++ b/Alc/mixer_sse.c @@ -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; diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 50692f7a..32ea0047 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -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); -- cgit v1.2.3