aboutsummaryrefslogtreecommitdiffstats
path: root/alc/mixer/mixer_neon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/mixer/mixer_neon.cpp')
-rw-r--r--alc/mixer/mixer_neon.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/alc/mixer/mixer_neon.cpp b/alc/mixer/mixer_neon.cpp
index 1b6e7b54..fa7c142a 100644
--- a/alc/mixer/mixer_neon.cpp
+++ b/alc/mixer/mixer_neon.cpp
@@ -21,6 +21,16 @@ struct FastBSincTag;
namespace {
+inline float32x4_t set_f4(float l0, float l1, float l2, float l3)
+{
+ float32x4_t ret{};
+ ret = vsetq_lane_f32(l0, ret, 0);
+ ret = vsetq_lane_f32(l1, ret, 1);
+ ret = vsetq_lane_f32(l2, ret, 2);
+ ret = vsetq_lane_f32(l3, ret, 3);
+ return ret;
+}
+
constexpr ALuint FracPhaseBitDiff{MixerFracBits - BSincPhaseBits};
constexpr ALuint FracPhaseDiffOne{1 << FracPhaseBitDiff};
@@ -70,8 +80,8 @@ const float *Resample_<LerpTag,NEONTag>(const InterpState*, const float *RESTRIC
const int pos1{vgetq_lane_s32(pos4, 1)};
const int pos2{vgetq_lane_s32(pos4, 2)};
const int pos3{vgetq_lane_s32(pos4, 3)};
- const float32x4_t val1{src[pos0], src[pos1], src[pos2], src[pos3]};
- const float32x4_t val2{src[pos0+1], src[pos1+1], src[pos2+1], src[pos3+1]};
+ const float32x4_t val1{set_f4(src[pos0], src[pos1], src[pos2], src[pos3])};
+ const float32x4_t val2{set_f4(src[pos0+1], src[pos1+1], src[pos2+1], src[pos3+1])};
/* val1 + (val2-val1)*mu */
const float32x4_t r0{vsubq_f32(val2, val1)};