aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
Diffstat (limited to 'alc')
-rw-r--r--alc/mixer/mixer_neon.cpp11
-rw-r--r--alc/mixer/mixer_sse.cpp4
2 files changed, 7 insertions, 8 deletions
diff --git a/alc/mixer/mixer_neon.cpp b/alc/mixer/mixer_neon.cpp
index 9048e30b..e44a3dbe 100644
--- a/alc/mixer/mixer_neon.cpp
+++ b/alc/mixer/mixer_neon.cpp
@@ -236,12 +236,11 @@ void Mix_<NEONTag>(const al::span<const float> InSamples, const al::span<FloatBu
const float32x4_t four4{vdupq_n_f32(4.0f)};
const float32x4_t step4{vdupq_n_f32(step)};
const float32x4_t gain4{vdupq_n_f32(gain)};
- float32x4_t step_count4{vsetq_lane_f32(0.0f,
- vsetq_lane_f32(1.0f,
- vsetq_lane_f32(2.0f,
- vsetq_lane_f32(3.0f, vdupq_n_f32(0.0f), 3),
- 2), 1), 0
- )};
+ float32x4_t step_count4{vdupq_n_f32(0.0f)};
+ step_count4 = vsetq_lane_f32(1.0f, step_count4, 1);
+ step_count4 = vsetq_lane_f32(2.0f, step_count4, 2);
+ step_count4 = vsetq_lane_f32(3.0f, step_count4, 3);
+
do {
const float32x4_t val4 = vld1q_f32(in_iter);
float32x4_t dry4 = vld1q_f32(dst);
diff --git a/alc/mixer/mixer_sse.cpp b/alc/mixer/mixer_sse.cpp
index 6dcdbf3e..f9ed8f73 100644
--- a/alc/mixer/mixer_sse.cpp
+++ b/alc/mixer/mixer_sse.cpp
@@ -214,10 +214,10 @@ void Mix_<SSETag>(const al::span<const float> InSamples, const al::span<FloatBuf
do {
const __m128 val4{_mm_load_ps(in_iter)};
__m128 dry4{_mm_load_ps(dst)};
-#define MLA4(x, y, z) _mm_add_ps(x, _mm_mul_ps(y, z))
+
/* dry += val * (gain + step*step_count) */
dry4 = MLA4(dry4, val4, MLA4(gain4, step4, step_count4));
-#undef MLA4
+
_mm_store_ps(dst, dry4);
step_count4 = _mm_add_ps(step_count4, four4);
in_iter += 4; dst += 4;