aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-03-10 10:30:33 -0700
committerChris Robinson <[email protected]>2019-03-10 10:30:33 -0700
commit12721f94a72b94c9eab0fc861ad021d915fc0228 (patch)
tree971778d9143ba4233cc5654e834c0bb3f4ebf3e1 /Alc/effects
parent6a95189ef66bee5dc600f33c5518a60de042a225 (diff)
Add a method to apply an HF scale without band-splitting
Diffstat (limited to 'Alc/effects')
-rw-r--r--Alc/effects/reverb.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp
index 24107dc7..086ffed2 100644
--- a/Alc/effects/reverb.cpp
+++ b/Alc/effects/reverb.cpp
@@ -424,32 +424,23 @@ struct ReverbState final : public EffectState {
for(ALsizei c{0};c < NUM_LINES;c++)
{
/* Apply scaling to the B-Format's HF response to "upsample" it to
- * higher-order output. Use the early buffer to store the split
- * signal since it's not needed anymore.
+ * higher-order output.
*/
const ALfloat hfscale{(c==0) ? mOrderScales[0] : mOrderScales[1]};
- ALfloat (&hfbuf)[BUFFERSIZE] = mEarlyBuffer[0];
- ALfloat (&lfbuf)[BUFFERSIZE] = mEarlyBuffer[1];
+ mAmbiSplitter[0][c].applyHfScale(mTempSamples[c], hfscale, todo);
- mAmbiSplitter[0][c].process(hfbuf, lfbuf, mTempSamples[c], todo);
- MixRowSamples(lfbuf, &hfscale, &hfbuf, 1, 0, todo);
-
- MixSamples(lfbuf, numOutput, samplesOut, mEarly.CurrentGain[c], mEarly.PanGain[c],
- todo, 0, todo);
+ MixSamples(mTempSamples[c], numOutput, samplesOut, mEarly.CurrentGain[c],
+ mEarly.PanGain[c], todo, 0, todo);
}
ConvertA2B(mTempSamples, mLateBuffer, todo);
for(ALsizei c{0};c < NUM_LINES;c++)
{
const ALfloat hfscale{(c==0) ? mOrderScales[0] : mOrderScales[1]};
- ALfloat (&hfbuf)[BUFFERSIZE] = mLateBuffer[0];
- ALfloat (&lfbuf)[BUFFERSIZE] = mLateBuffer[1];
+ mAmbiSplitter[1][c].applyHfScale(mTempSamples[c], hfscale, todo);
- mAmbiSplitter[1][c].process(hfbuf, lfbuf, mTempSamples[c], todo);
- MixRowSamples(lfbuf, &hfscale, &hfbuf, 1, 0, todo);
-
- MixSamples(lfbuf, numOutput, samplesOut, mLate.CurrentGain[c], mLate.PanGain[c], todo,
- 0, todo);
+ MixSamples(mTempSamples[c], numOutput, samplesOut, mLate.CurrentGain[c],
+ mLate.PanGain[c], todo, 0, todo);
}
}