aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-08-18 03:55:09 -0700
committerChris Robinson <[email protected]>2019-08-18 15:15:56 -0700
commit4f4ef3a41015cfc499afc1d3101f2e99d29ebb9e (patch)
treee89de9b09cb3afc9a6d3eee427b57873259502a5 /alc
parent6750907bddc96e8552f16c6ba88ddcc18d4d9236 (diff)
Don't require MixRow's output to be a FloatBufferLine
Diffstat (limited to 'alc')
-rw-r--r--alc/alu.h2
-rw-r--r--alc/bformatdec.cpp6
-rw-r--r--alc/effects/reverb.cpp10
-rw-r--r--alc/mixer/defs.h2
-rw-r--r--alc/mixer/mixer_c.cpp2
-rw-r--r--alc/mixer/mixer_neon.cpp2
-rw-r--r--alc/mixer/mixer_sse.cpp2
7 files changed, 13 insertions, 13 deletions
diff --git a/alc/alu.h b/alc/alu.h
index b030dbaa..5044f573 100644
--- a/alc/alu.h
+++ b/alc/alu.h
@@ -317,7 +317,7 @@ struct ALvoice {
using MixerFunc = void(*)(const ALfloat *data, const al::span<FloatBufferLine> OutBuffer,
ALfloat *CurrentGains, const ALfloat *TargetGains, const ALsizei Counter, const ALsizei OutPos,
const ALsizei BufferSize);
-using RowMixerFunc = void(*)(FloatBufferLine &OutBuffer, const ALfloat *gains,
+using RowMixerFunc = void(*)(ALfloat *OutBuffer, const ALfloat *gains,
const al::span<const FloatBufferLine> InSamples, const ALsizei InPos,
const ALsizei BufferSize);
using HrtfMixerFunc = void(*)(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
diff --git a/alc/bformatdec.cpp b/alc/bformatdec.cpp
index 98ef58cb..a241cc93 100644
--- a/alc/bformatdec.cpp
+++ b/alc/bformatdec.cpp
@@ -164,8 +164,8 @@ void BFormatDec::process(const al::span<FloatBufferLine> OutBuffer,
{
if LIKELY(enabled&1)
{
- MixRowSamples(outbuf, (*mixmtx)[sHFBand], hfsamples, 0, SamplesToDo);
- MixRowSamples(outbuf, (*mixmtx)[sLFBand], lfsamples, 0, SamplesToDo);
+ MixRowSamples(outbuf.data(), (*mixmtx)[sHFBand], hfsamples, 0, SamplesToDo);
+ MixRowSamples(outbuf.data(), (*mixmtx)[sLFBand], lfsamples, 0, SamplesToDo);
}
++mixmtx;
enabled >>= 1;
@@ -179,7 +179,7 @@ void BFormatDec::process(const al::span<FloatBufferLine> OutBuffer,
for(FloatBufferLine &outbuf : OutBuffer)
{
if LIKELY(enabled&1)
- MixRowSamples(outbuf, *mixmtx, insamples, 0, SamplesToDo);
+ MixRowSamples(outbuf.data(), *mixmtx, insamples, 0, SamplesToDo);
++mixmtx;
enabled >>= 1;
}
diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp
index 26d4d012..08d1ea7b 100644
--- a/alc/effects/reverb.cpp
+++ b/alc/effects/reverb.cpp
@@ -424,14 +424,14 @@ struct ReverbState final : public EffectState {
for(ALsizei c{0};c < NUM_LINES;c++)
{
std::fill_n(mTempLine.begin(), todo, 0.0f);
- MixRowSamples(mTempLine, A2B[c], mTempSamples, sEarlyOffset, todo);
+ MixRowSamples(mTempLine.data(), A2B[c], mTempSamples, sEarlyOffset, todo);
MixSamples(mTempLine.data(), samplesOut, mEarly.CurrentGain[c],
mEarly.PanGain[c], counter, offset, todo);
}
for(ALsizei c{0};c < NUM_LINES;c++)
{
std::fill_n(mTempLine.begin(), todo, 0.0f);
- MixRowSamples(mTempLine, A2B[c], mTempSamples, sLateOffset, todo);
+ MixRowSamples(mTempLine.data(), A2B[c], mTempSamples, sLateOffset, todo);
MixSamples(mTempLine.data(), samplesOut, mLate.CurrentGain[c], mLate.PanGain[c],
counter, offset, todo);
}
@@ -445,7 +445,7 @@ struct ReverbState final : public EffectState {
for(ALsizei c{0};c < NUM_LINES;c++)
{
std::fill_n(mTempLine.begin(), todo, 0.0f);
- MixRowSamples(mTempLine, A2B[c], mTempSamples, sEarlyOffset, todo);
+ MixRowSamples(mTempLine.data(), A2B[c], mTempSamples, sEarlyOffset, todo);
/* Apply scaling to the B-Format's HF response to "upsample" it to
* higher-order output.
@@ -459,7 +459,7 @@ struct ReverbState final : public EffectState {
for(ALsizei c{0};c < NUM_LINES;c++)
{
std::fill_n(mTempLine.begin(), todo, 0.0f);
- MixRowSamples(mTempLine, A2B[c], mTempSamples, sLateOffset, todo);
+ MixRowSamples(mTempLine.data(), A2B[c], mTempSamples, sLateOffset, todo);
const ALfloat hfscale{(c==0) ? mOrderScales[0] : mOrderScales[1]};
mAmbiSplitter[1][c].applyHfScale(mTempLine.data(), hfscale, todo);
@@ -1457,7 +1457,7 @@ void ReverbState::process(const ALsizei samplesToDo, const FloatBufferLine *REST
for(ALsizei c{0};c < NUM_LINES;c++)
{
std::fill_n(mTempLine.begin(), samplesToDo, 0.0f);
- MixRowSamples(mTempLine, B2A[c], {samplesIn, samplesIn+numInput}, 0, samplesToDo);
+ MixRowSamples(mTempLine.data(), B2A[c], {samplesIn, samplesIn+numInput}, 0, samplesToDo);
/* Band-pass the incoming samples and feed the initial delay line. */
mFilter[c].Lp.process(mTempLine.data(), mTempLine.data(), samplesToDo);
diff --git a/alc/mixer/defs.h b/alc/mixer/defs.h
index 0cd4162a..55de2e67 100644
--- a/alc/mixer/defs.h
+++ b/alc/mixer/defs.h
@@ -32,7 +32,7 @@ const ALfloat *Resample_(const InterpState *state, const ALfloat *RESTRICT src,
template<InstSetType InstTag>
void Mix_(const ALfloat *data, const al::span<FloatBufferLine> OutBuffer, ALfloat *CurrentGains, const ALfloat *TargetGains, const ALsizei Counter, const ALsizei OutPos, const ALsizei BufferSize);
template<InstSetType InstTag>
-void MixRow_(FloatBufferLine &OutBuffer, const ALfloat *Gains, const al::span<const FloatBufferLine> InSamples, const ALsizei InPos, const ALsizei BufferSize);
+void MixRow_(ALfloat *OutBuffer, const ALfloat *Gains, const al::span<const FloatBufferLine> InSamples, const ALsizei InPos, const ALsizei BufferSize);
template<InstSetType InstTag>
void MixHrtf_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize, MixHrtfFilter *hrtfparams, const ALsizei BufferSize);
diff --git a/alc/mixer/mixer_c.cpp b/alc/mixer/mixer_c.cpp
index 765b03fa..ff20bb2b 100644
--- a/alc/mixer/mixer_c.cpp
+++ b/alc/mixer/mixer_c.cpp
@@ -189,7 +189,7 @@ void Mix_<CTag>(const ALfloat *data, const al::span<FloatBufferLine> OutBuffer,
* stepping is necessary.
*/
template<>
-void MixRow_<CTag>(FloatBufferLine &OutBuffer, const ALfloat *Gains,
+void MixRow_<CTag>(ALfloat *OutBuffer, const ALfloat *Gains,
const al::span<const FloatBufferLine> InSamples, const ALsizei InPos, const ALsizei BufferSize)
{
ASSUME(BufferSize > 0);
diff --git a/alc/mixer/mixer_neon.cpp b/alc/mixer/mixer_neon.cpp
index f43063ce..40cbdb23 100644
--- a/alc/mixer/mixer_neon.cpp
+++ b/alc/mixer/mixer_neon.cpp
@@ -276,7 +276,7 @@ void Mix_<NEONTag>(const ALfloat *data, const al::span<FloatBufferLine> OutBuffe
}
template<>
-void MixRow_<NEONTag>(FloatBufferLine &OutBuffer, const ALfloat *Gains,
+void MixRow_<NEONTag>(ALfloat *OutBuffer, const ALfloat *Gains,
const al::span<const FloatBufferLine> InSamples, const ALsizei InPos, const ALsizei BufferSize)
{
ASSUME(BufferSize > 0);
diff --git a/alc/mixer/mixer_sse.cpp b/alc/mixer/mixer_sse.cpp
index cff37d2b..6c7715fc 100644
--- a/alc/mixer/mixer_sse.cpp
+++ b/alc/mixer/mixer_sse.cpp
@@ -229,7 +229,7 @@ void Mix_<SSETag>(const ALfloat *data, const al::span<FloatBufferLine> OutBuffer
}
template<>
-void MixRow_<SSETag>(FloatBufferLine &OutBuffer, const ALfloat *Gains,
+void MixRow_<SSETag>(ALfloat *OutBuffer, const ALfloat *Gains,
const al::span<const FloatBufferLine> InSamples, const ALsizei InPos, const ALsizei BufferSize)
{
ASSUME(BufferSize > 0);