aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
Diffstat (limited to 'alc')
-rw-r--r--alc/alu.h6
-rw-r--r--alc/mixer/defs.h9
-rw-r--r--alc/mixer/hrtfbase.h6
-rw-r--r--alc/mixer/mixer_c.cpp8
-rw-r--r--alc/mixer/mixer_neon.cpp8
-rw-r--r--alc/mixer/mixer_sse.cpp8
6 files changed, 22 insertions, 23 deletions
diff --git a/alc/alu.h b/alc/alu.h
index e4036d19..c4848e3e 100644
--- a/alc/alu.h
+++ b/alc/alu.h
@@ -315,14 +315,14 @@ struct ALvoice {
using MixerFunc = void(*)(const al::span<const float> InSamples,
const al::span<FloatBufferLine> OutBuffer, float *CurrentGains, const float *TargetGains,
- const ALsizei Counter, const ALsizei OutPos);
+ const size_t Counter, const size_t OutPos);
using RowMixerFunc = void(*)(const al::span<float> OutBuffer, const al::span<const float> Gains,
const float *InSamples, const size_t InStride);
using HrtfMixerFunc = void(*)(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
- const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
+ const ALfloat *InSamples, float2 *AccumSamples, const size_t OutPos, const ALsizei IrSize,
MixHrtfFilter *hrtfparams, const size_t BufferSize);
using HrtfMixerBlendFunc = void(*)(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
- const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
+ const ALfloat *InSamples, float2 *AccumSamples, const size_t OutPos, const ALsizei IrSize,
const HrtfFilter *oldparams, MixHrtfFilter *newparams, const size_t BufferSize);
using HrtfDirectMixerFunc = void(*)(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
const al::span<const FloatBufferLine> InSamples, float2 *AccumSamples, DirectHrtfState *State,
diff --git a/alc/mixer/defs.h b/alc/mixer/defs.h
index 1a949ef3..bb5ca56e 100644
--- a/alc/mixer/defs.h
+++ b/alc/mixer/defs.h
@@ -27,19 +27,20 @@ enum ResampleType {
};
template<ResampleType TypeTag, InstSetType InstTag>
-const ALfloat *Resample_(const InterpState *state, const ALfloat *RESTRICT src, ALsizei frac, ALint increment, const al::span<float> dst);
+const ALfloat *Resample_(const InterpState *state, const ALfloat *RESTRICT src, ALsizei frac,
+ ALint increment, const al::span<float> dst);
template<InstSetType InstTag>
void Mix_(const al::span<const float> InSamples, const al::span<FloatBufferLine> OutBuffer,
- float *CurrentGains, const float *TargetGains, const ALsizei Counter, const ALsizei OutPos);
+ float *CurrentGains, const float *TargetGains, const size_t Counter, const size_t OutPos);
template<InstSetType InstTag>
void MixRow_(const al::span<float> OutBuffer, const al::span<const float> Gains,
const float *InSamples, const size_t InStride);
template<InstSetType InstTag>
-void MixHrtf_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize, MixHrtfFilter *hrtfparams, const size_t BufferSize);
+void MixHrtf_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const ALfloat *InSamples, float2 *AccumSamples, const size_t OutPos, const ALsizei IrSize, MixHrtfFilter *hrtfparams, const size_t BufferSize);
template<InstSetType InstTag>
-void MixHrtfBlend_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize, const HrtfFilter *oldparams, MixHrtfFilter *newparams, const size_t BufferSize);
+void MixHrtfBlend_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const ALfloat *InSamples, float2 *AccumSamples, const size_t OutPos, const ALsizei IrSize, const HrtfFilter *oldparams, MixHrtfFilter *newparams, const size_t BufferSize);
template<InstSetType InstTag>
void MixDirectHrtf_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const al::span<const FloatBufferLine> InSamples, float2 *AccumSamples, DirectHrtfState *State, const size_t BufferSize);
diff --git a/alc/mixer/hrtfbase.h b/alc/mixer/hrtfbase.h
index 741e17d0..82446714 100644
--- a/alc/mixer/hrtfbase.h
+++ b/alc/mixer/hrtfbase.h
@@ -13,10 +13,9 @@ using ApplyCoeffsT = void(size_t Offset, float2 *RESTRICT Values, const ALsizei
template<ApplyCoeffsT &ApplyCoeffs>
inline void MixHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
- const ALfloat *InSamples, float2 *RESTRICT AccumSamples, const ALsizei OutPos,
+ const ALfloat *InSamples, float2 *RESTRICT AccumSamples, const size_t OutPos,
const ALsizei IrSize, MixHrtfFilter *hrtfparams, const size_t BufferSize)
{
- ASSUME(OutPos >= 0);
ASSUME(IrSize >= 4);
ASSUME(BufferSize > 0);
@@ -49,7 +48,7 @@ inline void MixHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
template<ApplyCoeffsT &ApplyCoeffs>
inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
- const ALfloat *InSamples, float2 *RESTRICT AccumSamples, const ALsizei OutPos,
+ const ALfloat *InSamples, float2 *RESTRICT AccumSamples, const size_t OutPos,
const ALsizei IrSize, const HrtfFilter *oldparams, MixHrtfFilter *newparams,
const size_t BufferSize)
{
@@ -59,7 +58,6 @@ inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut
const auto &NewCoeffs = *newparams->Coeffs;
const ALfloat newGainStep{newparams->GainStep};
- ASSUME(OutPos >= 0);
ASSUME(IrSize >= 4);
ASSUME(BufferSize > 0);
diff --git a/alc/mixer/mixer_c.cpp b/alc/mixer/mixer_c.cpp
index 4af88fec..dbdbf16d 100644
--- a/alc/mixer/mixer_c.cpp
+++ b/alc/mixer/mixer_c.cpp
@@ -114,7 +114,7 @@ static inline void ApplyCoeffs(size_t /*Offset*/, float2 *RESTRICT Values, const
template<>
void MixHrtf_<CTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
- const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
+ const ALfloat *InSamples, float2 *AccumSamples, const size_t OutPos, const ALsizei IrSize,
MixHrtfFilter *hrtfparams, const size_t BufferSize)
{
MixHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
@@ -123,7 +123,7 @@ void MixHrtf_<CTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
template<>
void MixHrtfBlend_<CTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
- const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
+ const ALfloat *InSamples, float2 *AccumSamples, const size_t OutPos, const ALsizei IrSize,
const HrtfFilter *oldparams, MixHrtfFilter *newparams, const size_t BufferSize)
{
MixHrtfBlendBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
@@ -141,10 +141,10 @@ void MixDirectHrtf_<CTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
template<>
void Mix_<CTag>(const al::span<const float> InSamples, const al::span<FloatBufferLine> OutBuffer,
- float *CurrentGains, const float *TargetGains, const ALsizei Counter, const ALsizei OutPos)
+ float *CurrentGains, const float *TargetGains, const size_t Counter, const size_t OutPos)
{
const ALfloat delta{(Counter > 0) ? 1.0f / static_cast<ALfloat>(Counter) : 0.0f};
- const bool reached_target{InSamples.size() >= static_cast<size_t>(Counter)};
+ const bool reached_target{InSamples.size() >= Counter};
const auto min_end = reached_target ? InSamples.begin() + Counter : InSamples.end();
for(FloatBufferLine &output : OutBuffer)
{
diff --git a/alc/mixer/mixer_neon.cpp b/alc/mixer/mixer_neon.cpp
index bbf1d9f1..10965234 100644
--- a/alc/mixer/mixer_neon.cpp
+++ b/alc/mixer/mixer_neon.cpp
@@ -160,7 +160,7 @@ static inline void ApplyCoeffs(size_t /*Offset*/, float2 *RESTRICT Values, const
template<>
void MixHrtf_<NEONTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
- const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
+ const ALfloat *InSamples, float2 *AccumSamples, const size_t OutPos, const ALsizei IrSize,
MixHrtfFilter *hrtfparams, const size_t BufferSize)
{
MixHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
@@ -169,7 +169,7 @@ void MixHrtf_<NEONTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
template<>
void MixHrtfBlend_<NEONTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
- const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
+ const ALfloat *InSamples, float2 *AccumSamples, const size_t OutPos, const ALsizei IrSize,
const HrtfFilter *oldparams, MixHrtfFilter *newparams, const size_t BufferSize)
{
MixHrtfBlendBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
@@ -187,10 +187,10 @@ void MixDirectHrtf_<NEONTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut
template<>
void Mix_<NEONTag>(const al::span<const float> InSamples, const al::span<FloatBufferLine> OutBuffer,
- float *CurrentGains, const float *TargetGains, const ALsizei Counter, const ALsizei OutPos)
+ float *CurrentGains, const float *TargetGains, const size_t Counter, const size_t OutPos)
{
const ALfloat delta{(Counter > 0) ? 1.0f / static_cast<ALfloat>(Counter) : 0.0f};
- const bool reached_target{InSamples.size() >= static_cast<size_t>(Counter)};
+ const bool reached_target{InSamples.size() >= Counter};
const auto min_end = reached_target ? InSamples.begin() + Counter : InSamples.end();
const auto aligned_end = minz(InSamples.size(), (min_end-InSamples.begin()+3) & ~3) +
InSamples.begin();
diff --git a/alc/mixer/mixer_sse.cpp b/alc/mixer/mixer_sse.cpp
index b7503118..36690a2e 100644
--- a/alc/mixer/mixer_sse.cpp
+++ b/alc/mixer/mixer_sse.cpp
@@ -118,7 +118,7 @@ static inline void ApplyCoeffs(size_t Offset, float2 *RESTRICT Values, const ALs
template<>
void MixHrtf_<SSETag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
- const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
+ const ALfloat *InSamples, float2 *AccumSamples, const size_t OutPos, const ALsizei IrSize,
MixHrtfFilter *hrtfparams, const size_t BufferSize)
{
MixHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
@@ -127,7 +127,7 @@ void MixHrtf_<SSETag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
template<>
void MixHrtfBlend_<SSETag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
- const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
+ const ALfloat *InSamples, float2 *AccumSamples, const size_t OutPos, const ALsizei IrSize,
const HrtfFilter *oldparams, MixHrtfFilter *newparams, const size_t BufferSize)
{
MixHrtfBlendBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
@@ -145,10 +145,10 @@ void MixDirectHrtf_<SSETag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
template<>
void Mix_<SSETag>(const al::span<const float> InSamples, const al::span<FloatBufferLine> OutBuffer,
- float *CurrentGains, const float *TargetGains, const ALsizei Counter, const ALsizei OutPos)
+ float *CurrentGains, const float *TargetGains, const size_t Counter, const size_t OutPos)
{
const ALfloat delta{(Counter > 0) ? 1.0f / static_cast<ALfloat>(Counter) : 0.0f};
- const bool reached_target{InSamples.size() >= static_cast<size_t>(Counter)};
+ const bool reached_target{InSamples.size() >= Counter};
const auto min_end = reached_target ? InSamples.begin() + Counter : InSamples.end();
const auto aligned_end = minz(InSamples.size(), (min_end-InSamples.begin()+3) & ~3) +
InSamples.begin();