Remove some now-unnecessary ReverbState fields

This commit is contained in:
Chris Robinson
2019-02-21 03:07:36 -08:00
parent 4b4041319d
commit d95e144c48
+1 -26
View File
@@ -297,9 +297,6 @@ struct ReverbState final : public EffectState {
ALfloat LFReference{AL_EAXREVERB_DEFAULT_LFREFERENCE};
} mParams;
ALsizei mNumInputs{0}; /* 3 or 4 */
ALfloat mInputConv[NUM_LINES][4/*NumInputs*/];
/* Master effect filters */
struct {
BiquadFilter Lp;
@@ -470,28 +467,6 @@ ALboolean ReverbState::deviceUpdate(const ALCdevice *Device)
EARLY_TAP_LENGTHS[NUM_LINES-1]*multiplier) *
frequency);
mNumInputs = 4;
if(mNumInputs == 3)
{
for(ALsizei i{0};i < NUM_LINES;++i)
{
mInputConv[i][0] = B2A[i][0];
mInputConv[i][1] = B2A[i][1];
mInputConv[i][2] = B2A[i][3];
mInputConv[i][3] = 0.0f;
}
}
else
{
for(ALsizei i{0};i < NUM_LINES;++i)
{
mInputConv[i][0] = B2A[i][0];
mInputConv[i][1] = B2A[i][1];
mInputConv[i][2] = B2A[i][2];
mInputConv[i][3] = B2A[i][3];
}
}
/* Clear filters and gain coefficients since the delay lines were all just
* cleared (if not reallocated).
*/
@@ -1346,7 +1321,7 @@ void ReverbState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesI
for(ALsizei c{0};c < NUM_LINES;c++)
{
std::fill(std::begin(afmt[c]), std::end(afmt[c]), 0.0f);
MixRowSamples(afmt[c], mInputConv[c], samplesIn, numInput, base, todo);
MixRowSamples(afmt[c], B2A[c].data(), samplesIn, numInput, base, todo);
}
/* Process the samples for reverb. */