diff options
Diffstat (limited to 'alc/mixer/mixer_neon.cpp')
-rw-r--r-- | alc/mixer/mixer_neon.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/alc/mixer/mixer_neon.cpp b/alc/mixer/mixer_neon.cpp index 83388b68..2cf7e2e8 100644 --- a/alc/mixer/mixer_neon.cpp +++ b/alc/mixer/mixer_neon.cpp @@ -64,8 +64,7 @@ const float *Resample_<LerpTag,NEONTag>(const InterpState*, const float *RESTRIC pos4 = vld1q_s32(reinterpret_cast<int*>(pos_)); auto dst_iter = dst.begin(); - const auto aligned_end = (dst.size()&~3u) + dst_iter; - while(dst_iter != aligned_end) + for(size_t todo{dst.size()>>2};todo;--todo) { const int pos0{vgetq_lane_s32(pos4, 0)}; const int pos1{vgetq_lane_s32(pos4, 1)}; @@ -87,7 +86,7 @@ const float *Resample_<LerpTag,NEONTag>(const InterpState*, const float *RESTRIC frac4 = vandq_s32(frac4, fracMask4); } - if(dst_iter != dst.end()) + if(size_t todo{dst.size()&3}) { src += static_cast<ALuint>(vgetq_lane_s32(pos4, 0)); frac = static_cast<ALuint>(vgetq_lane_s32(frac4, 0)); @@ -98,7 +97,7 @@ const float *Resample_<LerpTag,NEONTag>(const InterpState*, const float *RESTRIC frac += increment; src += frac>>FRACTIONBITS; frac &= FRACTIONMASK; - } while(dst_iter != dst.end()); + } while(--todo); } return dst.data(); } |