diff options
author | Chris Robinson <[email protected]> | 2019-09-04 19:31:30 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-09-04 19:31:30 -0700 |
commit | e873165019e8ae9300be9066101554c18a29df83 (patch) | |
tree | 2989d306c2189204f36d8a0e6bcf9b89e4322adf /alc/mixer | |
parent | 8940bbd034177182bb6fc1e3953e57674e488309 (diff) |
Only ASSUME values where a variable is used
Diffstat (limited to 'alc/mixer')
-rw-r--r-- | alc/mixer/hrtfbase.h | 3 | ||||
-rw-r--r-- | alc/mixer/mixer_c.cpp | 2 | ||||
-rw-r--r-- | alc/mixer/mixer_neon.cpp | 2 | ||||
-rw-r--r-- | alc/mixer/mixer_sse.cpp | 2 |
4 files changed, 3 insertions, 6 deletions
diff --git a/alc/mixer/hrtfbase.h b/alc/mixer/hrtfbase.h index 5ae83fc9..0309fe5d 100644 --- a/alc/mixer/hrtfbase.h +++ b/alc/mixer/hrtfbase.h @@ -16,7 +16,6 @@ inline void MixHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const ALfloat *InSamples, float2 *RESTRICT AccumSamples, const size_t OutPos, const ALsizei IrSize, MixHrtfFilter *hrtfparams, const size_t BufferSize) { - ASSUME(IrSize >= 4); ASSUME(BufferSize > 0); const HrirArray &Coeffs = *hrtfparams->Coeffs; @@ -58,7 +57,6 @@ inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut const auto &NewCoeffs = *newparams->Coeffs; const ALfloat newGainStep{newparams->GainStep}; - ASSUME(IrSize >= 4); ASSUME(BufferSize > 0); ALsizei Delay[2]{ @@ -106,7 +104,6 @@ inline void MixDirectHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOu ASSUME(BufferSize > 0); const ALsizei IrSize{State->IrSize}; - ASSUME(IrSize >= 4); auto accum_iter = std::copy_n(State->Values.begin(), State->Values.size(), AccumSamples); std::fill_n(accum_iter, BufferSize, float2{}); diff --git a/alc/mixer/mixer_c.cpp b/alc/mixer/mixer_c.cpp index 7a79d1e2..a8fb9a19 100644 --- a/alc/mixer/mixer_c.cpp +++ b/alc/mixer/mixer_c.cpp @@ -103,7 +103,7 @@ const ALfloat *Resample_<BSincTag,CTag>(const InterpState *state, const ALfloat static inline void ApplyCoeffs(size_t /*Offset*/, float2 *RESTRICT Values, const ALsizei IrSize, const HrirArray &Coeffs, const ALfloat left, const ALfloat right) { - ASSUME(IrSize >= 2); + ASSUME(IrSize >= 4); for(ALsizei c{0};c < IrSize;++c) { Values[c][0] += Coeffs[c][0] * left; diff --git a/alc/mixer/mixer_neon.cpp b/alc/mixer/mixer_neon.cpp index d3e89aec..b8a15c62 100644 --- a/alc/mixer/mixer_neon.cpp +++ b/alc/mixer/mixer_neon.cpp @@ -128,7 +128,7 @@ const ALfloat *Resample_<BSincTag,NEONTag>(const InterpState *state, const ALflo static inline void ApplyCoeffs(size_t /*Offset*/, float2 *RESTRICT Values, const ALsizei IrSize, const HrirArray &Coeffs, const ALfloat left, const ALfloat right) { - ASSUME(IrSize >= 2); + ASSUME(IrSize >= 4); float32x4_t leftright4; { diff --git a/alc/mixer/mixer_sse.cpp b/alc/mixer/mixer_sse.cpp index 05ebe26f..1965f3e6 100644 --- a/alc/mixer/mixer_sse.cpp +++ b/alc/mixer/mixer_sse.cpp @@ -74,7 +74,7 @@ static inline void ApplyCoeffs(size_t Offset, float2 *RESTRICT Values, const ALs { const __m128 lrlr{_mm_setr_ps(left, right, left, right)}; - ASSUME(IrSize >= 2); + ASSUME(IrSize >= 4); if((Offset&1)) { |