aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-12-12 20:21:56 -0800
committerChris Robinson <[email protected]>2020-12-12 23:41:38 -0800
commit225d42538d2397e2698b9edb359c360dde3d00a8 (patch)
tree33baffc701058760ff3fc3a068cb0e164ab58ccc /core
parentbb597546e1db888120b0da5c23dbf249a281e6aa (diff)
Be more consistent with size_t
Diffstat (limited to 'core')
-rw-r--r--core/mixer/hrtfbase.h6
-rw-r--r--core/mixer/mixer_c.cpp4
-rw-r--r--core/mixer/mixer_neon.cpp4
-rw-r--r--core/mixer/mixer_sse.cpp6
4 files changed, 10 insertions, 10 deletions
diff --git a/core/mixer/hrtfbase.h b/core/mixer/hrtfbase.h
index 8031fe3d..39155adb 100644
--- a/core/mixer/hrtfbase.h
+++ b/core/mixer/hrtfbase.h
@@ -11,11 +11,11 @@
using uint = unsigned int;
-using ApplyCoeffsT = void(&)(float2 *RESTRICT Values, const uint_fast32_t irSize,
+using ApplyCoeffsT = void(&)(float2 *RESTRICT Values, const size_t irSize,
const HrirArray &Coeffs, const float left, const float right);
template<ApplyCoeffsT ApplyCoeffs>
-inline void MixHrtfBase(const float *InSamples, float2 *RESTRICT AccumSamples, const uint IrSize,
+inline void MixHrtfBase(const float *InSamples, float2 *RESTRICT AccumSamples, const size_t IrSize,
const MixHrtfFilter *hrtfparams, const size_t BufferSize)
{
ASSUME(BufferSize > 0);
@@ -40,7 +40,7 @@ inline void MixHrtfBase(const float *InSamples, float2 *RESTRICT AccumSamples, c
template<ApplyCoeffsT ApplyCoeffs>
inline void MixHrtfBlendBase(const float *InSamples, float2 *RESTRICT AccumSamples,
- const uint IrSize, const HrtfFilter *oldparams, const MixHrtfFilter *newparams,
+ const size_t IrSize, const HrtfFilter *oldparams, const MixHrtfFilter *newparams,
const size_t BufferSize)
{
ASSUME(BufferSize > 0);
diff --git a/core/mixer/mixer_c.cpp b/core/mixer/mixer_c.cpp
index 24ccd175..6b25b6cc 100644
--- a/core/mixer/mixer_c.cpp
+++ b/core/mixer/mixer_c.cpp
@@ -83,8 +83,8 @@ const float *DoResample(const InterpState *state, const float *RESTRICT src, uin
return dst.data();
}
-inline void ApplyCoeffs(float2 *RESTRICT Values, const uint_fast32_t IrSize,
- const HrirArray &Coeffs, const float left, const float right)
+inline void ApplyCoeffs(float2 *RESTRICT Values, const size_t IrSize, const HrirArray &Coeffs,
+ const float left, const float right)
{
ASSUME(IrSize >= MIN_IR_LENGTH);
for(size_t c{0};c < IrSize;++c)
diff --git a/core/mixer/mixer_neon.cpp b/core/mixer/mixer_neon.cpp
index af8f6b0c..3c7ddd4e 100644
--- a/core/mixer/mixer_neon.cpp
+++ b/core/mixer/mixer_neon.cpp
@@ -31,8 +31,8 @@ inline float32x4_t set_f4(float l0, float l1, float l2, float l3)
constexpr uint FracPhaseBitDiff{MixerFracBits - BSincPhaseBits};
constexpr uint FracPhaseDiffOne{1 << FracPhaseBitDiff};
-inline void ApplyCoeffs(float2 *RESTRICT Values, const uint_fast32_t IrSize,
- const HrirArray &Coeffs, const float left, const float right)
+inline void ApplyCoeffs(float2 *RESTRICT Values, const size_t IrSize, const HrirArray &Coeffs,
+ const float left, const float right)
{
float32x4_t leftright4;
{
diff --git a/core/mixer/mixer_sse.cpp b/core/mixer/mixer_sse.cpp
index 85b2f1ce..ff722c19 100644
--- a/core/mixer/mixer_sse.cpp
+++ b/core/mixer/mixer_sse.cpp
@@ -22,8 +22,8 @@ constexpr uint FracPhaseDiffOne{1 << FracPhaseBitDiff};
#define MLA4(x, y, z) _mm_add_ps(x, _mm_mul_ps(y, z))
-inline void ApplyCoeffs(float2 *RESTRICT Values, const uint_fast32_t IrSize,
- const HrirArray &Coeffs, const float left, const float right)
+inline void ApplyCoeffs(float2 *RESTRICT Values, const size_t IrSize, const HrirArray &Coeffs,
+ const float left, const float right)
{
const __m128 lrlr{_mm_setr_ps(left, right, left, right)};
@@ -40,7 +40,7 @@ inline void ApplyCoeffs(float2 *RESTRICT Values, const uint_fast32_t IrSize,
imp0 = _mm_mul_ps(lrlr, coeffs);
vals = _mm_add_ps(imp0, vals);
_mm_storel_pi(reinterpret_cast<__m64*>(&Values[0][0]), vals);
- uint_fast32_t td{((IrSize+1)>>1) - 1};
+ size_t td{((IrSize+1)>>1) - 1};
size_t i{1};
do {
coeffs = _mm_load_ps(&Coeffs[i+1][0]);