From 8af7b4c6e0ddaf4d66455702a7ede0c9036f3825 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 29 May 2019 20:45:33 -0700 Subject: Use FloatBufferLine and span<> for MixRowSamples --- Alc/mixer/mixer_c.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Alc/mixer/mixer_c.cpp') diff --git a/Alc/mixer/mixer_c.cpp b/Alc/mixer/mixer_c.cpp index 8ad3aca3..d1bbd25e 100644 --- a/Alc/mixer/mixer_c.cpp +++ b/Alc/mixer/mixer_c.cpp @@ -190,16 +190,15 @@ void Mix_(const ALfloat *data, const ALsizei OutChans, ALfloat (*OutBuffer * stepping is necessary. */ template<> -void MixRow_(ALfloat *OutBuffer, const ALfloat *Gains, const ALfloat (*data)[BUFFERSIZE], - const ALsizei InChans, const ALsizei InPos, const ALsizei BufferSize) +void MixRow_(FloatBufferLine &OutBuffer, const ALfloat *Gains, + const al::span InSamples, const ALsizei InPos, const ALsizei BufferSize) { - ASSUME(InChans > 0); ASSUME(BufferSize > 0); - for(ALsizei c{0};c < InChans;c++) + for(const FloatBufferLine &input : InSamples) { - const ALfloat *RESTRICT src{&data[c][InPos]}; - const ALfloat gain{Gains[c]}; + const ALfloat *RESTRICT src{input.data()+InPos}; + const ALfloat gain{*(Gains++)}; if(!(std::fabs(gain) > GAIN_SILENCE_THRESHOLD)) continue; -- cgit v1.2.3