aboutsummaryrefslogtreecommitdiffstats
path: root/alc/mixer/hrtfbase.h
diff options
context:
space:
mode:
Diffstat (limited to 'alc/mixer/hrtfbase.h')
-rw-r--r--alc/mixer/hrtfbase.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/alc/mixer/hrtfbase.h b/alc/mixer/hrtfbase.h
index 3c8208f3..741e17d0 100644
--- a/alc/mixer/hrtfbase.h
+++ b/alc/mixer/hrtfbase.h
@@ -8,13 +8,13 @@
#include "opthelpers.h"
-using ApplyCoeffsT = void(ALsizei Offset, float2 *RESTRICT Values, const ALsizei irSize,
+using ApplyCoeffsT = void(size_t Offset, float2 *RESTRICT Values, const ALsizei irSize,
const HrirArray &Coeffs, const ALfloat left, const ALfloat right);
template<ApplyCoeffsT &ApplyCoeffs>
inline void MixHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
const ALfloat *InSamples, float2 *RESTRICT AccumSamples, const ALsizei OutPos,
- const ALsizei IrSize, MixHrtfFilter *hrtfparams, const ALsizei BufferSize)
+ const ALsizei IrSize, MixHrtfFilter *hrtfparams, const size_t BufferSize)
{
ASSUME(OutPos >= 0);
ASSUME(IrSize >= 4);
@@ -29,7 +29,7 @@ inline void MixHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
HRTF_HISTORY_LENGTH - hrtfparams->Delay[1] };
ASSUME(Delay[0] >= 0 && Delay[1] >= 0);
ALfloat stepcount{0.0f};
- for(ALsizei i{0};i < BufferSize;++i)
+ for(size_t i{0u};i < BufferSize;++i)
{
const ALfloat g{gain + gainstep*stepcount};
const ALfloat left{InSamples[Delay[0]++] * g};
@@ -39,9 +39,9 @@ inline void MixHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
stepcount += 1.0f;
}
- for(ALsizei i{0};i < BufferSize;++i)
+ for(size_t i{0u};i < BufferSize;++i)
LeftOut[OutPos+i] += AccumSamples[i][0];
- for(ALsizei i{0};i < BufferSize;++i)
+ for(size_t i{0u};i < BufferSize;++i)
RightOut[OutPos+i] += AccumSamples[i][1];
hrtfparams->Gain = gain + gainstep*stepcount;
@@ -51,7 +51,7 @@ template<ApplyCoeffsT &ApplyCoeffs>
inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
const ALfloat *InSamples, float2 *RESTRICT AccumSamples, const ALsizei OutPos,
const ALsizei IrSize, const HrtfFilter *oldparams, MixHrtfFilter *newparams,
- const ALsizei BufferSize)
+ const size_t BufferSize)
{
const auto &OldCoeffs = oldparams->Coeffs;
const ALfloat oldGain{oldparams->Gain};
@@ -68,7 +68,7 @@ inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut
HRTF_HISTORY_LENGTH - oldparams->Delay[1] };
ASSUME(Delay[0] >= 0 && Delay[1] >= 0);
ALfloat stepcount{0.0f};
- for(ALsizei i{0};i < BufferSize;++i)
+ for(size_t i{0u};i < BufferSize;++i)
{
const ALfloat g{oldGain + oldGainStep*stepcount};
const ALfloat left{InSamples[Delay[0]++] * g};
@@ -82,7 +82,7 @@ inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut
Delay[1] = HRTF_HISTORY_LENGTH - newparams->Delay[1];
ASSUME(Delay[0] >= 0 && Delay[1] >= 0);
stepcount = 0.0f;
- for(ALsizei i{0};i < BufferSize;++i)
+ for(size_t i{0u};i < BufferSize;++i)
{
const ALfloat g{newGainStep*stepcount};
const ALfloat left{InSamples[Delay[0]++] * g};
@@ -92,9 +92,9 @@ inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut
stepcount += 1.0f;
}
- for(ALsizei i{0};i < BufferSize;++i)
+ for(size_t i{0u};i < BufferSize;++i)
LeftOut[OutPos+i] += AccumSamples[i][0];
- for(ALsizei i{0};i < BufferSize;++i)
+ for(size_t i{0u};i < BufferSize;++i)
RightOut[OutPos+i] += AccumSamples[i][1];
newparams->Gain = newGainStep*stepcount;
@@ -103,7 +103,7 @@ inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut
template<ApplyCoeffsT &ApplyCoeffs>
inline void MixDirectHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
const al::span<const FloatBufferLine> InSamples, float2 *RESTRICT AccumSamples,
- DirectHrtfState *State, const ALsizei BufferSize)
+ DirectHrtfState *State, const size_t BufferSize)
{
ASSUME(BufferSize > 0);
@@ -119,14 +119,14 @@ inline void MixDirectHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOu
chanstate->Values.size(), AccumSamples);
std::fill_n(accum_iter, BufferSize, float2{});
- for(ALsizei i{0};i < BufferSize;++i)
+ for(size_t i{0u};i < BufferSize;++i)
{
const ALfloat insample{input[i]};
ApplyCoeffs(i, AccumSamples+i, IrSize, Coeffs, insample, insample);
}
- for(ALsizei i{0};i < BufferSize;++i)
+ for(size_t i{0u};i < BufferSize;++i)
LeftOut[i] += AccumSamples[i][0];
- for(ALsizei i{0};i < BufferSize;++i)
+ for(size_t i{0u};i < BufferSize;++i)
RightOut[i] += AccumSamples[i][1];
std::copy_n(AccumSamples + BufferSize, chanstate->Values.size(),