From 2d0568c0484fa5abc74b084c094a325adb0bc452 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 19 Aug 2019 08:02:08 -0700 Subject: Allow using a variable channel stride for MixRowSamples --- alc/mixer/mixer_sse.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'alc/mixer/mixer_sse.cpp') diff --git a/alc/mixer/mixer_sse.cpp b/alc/mixer/mixer_sse.cpp index 6c7715fc..b5958c8e 100644 --- a/alc/mixer/mixer_sse.cpp +++ b/alc/mixer/mixer_sse.cpp @@ -229,15 +229,16 @@ void Mix_(const ALfloat *data, const al::span OutBuffer } template<> -void MixRow_(ALfloat *OutBuffer, const ALfloat *Gains, - const al::span InSamples, const ALsizei InPos, const ALsizei BufferSize) +void MixRow_(ALfloat *OutBuffer, const al::span Gains, + const ALfloat *InSamples, const ALsizei InStride, const ALsizei BufferSize) { ASSUME(BufferSize > 0); - for(const FloatBufferLine &input : InSamples) + for(const ALfloat gain : Gains) { - const ALfloat *RESTRICT src{al::assume_aligned<16>(input.data()+InPos)}; - const ALfloat gain{*(Gains++)}; + const ALfloat *RESTRICT src{InSamples}; + InSamples += InStride; + if(!(std::fabs(gain) > GAIN_SILENCE_THRESHOLD)) continue; -- cgit v1.2.3