From 7ff165b09562b6942160803b0ea713ff4c911354 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 29 Nov 2019 08:33:46 -0800 Subject: Use unsigned for array indices --- alc/mixer/hrtfbase.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'alc/mixer/hrtfbase.h') diff --git a/alc/mixer/hrtfbase.h b/alc/mixer/hrtfbase.h index 4a6eab50..942c56c3 100644 --- a/alc/mixer/hrtfbase.h +++ b/alc/mixer/hrtfbase.h @@ -22,10 +22,9 @@ inline void MixHrtfBase(const float *InSamples, float2 *RESTRICT AccumSamples, c const float gainstep{hrtfparams->GainStep}; const float gain{hrtfparams->Gain}; - ALsizei Delay[2]{ + size_t Delay[2]{ HRTF_HISTORY_LENGTH - hrtfparams->Delay[0], HRTF_HISTORY_LENGTH - hrtfparams->Delay[1] }; - ASSUME(Delay[0] >= 0 && Delay[1] >= 0); float stepcount{0.0f}; for(size_t i{0u};i < BufferSize;++i) { @@ -53,10 +52,9 @@ inline void MixHrtfBlendBase(const float *InSamples, float2 *RESTRICT AccumSampl ASSUME(BufferSize > 0); - ALsizei Delay[2]{ + size_t Delay[2]{ HRTF_HISTORY_LENGTH - oldparams->Delay[0], HRTF_HISTORY_LENGTH - oldparams->Delay[1] }; - ASSUME(Delay[0] >= 0 && Delay[1] >= 0); float stepcount{0.0f}; for(size_t i{0u};i < BufferSize;++i) { @@ -70,7 +68,6 @@ inline void MixHrtfBlendBase(const float *InSamples, float2 *RESTRICT AccumSampl Delay[0] = HRTF_HISTORY_LENGTH - newparams->Delay[0]; Delay[1] = HRTF_HISTORY_LENGTH - newparams->Delay[1]; - ASSUME(Delay[0] >= 0 && Delay[1] >= 0); stepcount = 0.0f; for(size_t i{0u};i < BufferSize;++i) { -- cgit v1.2.3