From 12721f94a72b94c9eab0fc861ad021d915fc0228 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 10 Mar 2019 10:30:33 -0700 Subject: Add a method to apply an HF scale without band-splitting --- Alc/effects/reverb.cpp | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'Alc/effects') 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); } } -- cgit v1.2.3