Backed out changeset ece4f9694407 (bug 1388656)

This commit is contained in:
Sebastian Hengst 2017-08-10 11:17:13 +02:00
parent 64aa1882b5
commit 69e0a8b3f7

View File

@ -66,8 +66,7 @@ public:
switch (aIndex) {
case SAMPLE_RATE:
mSampleRate = aParam;
// The buffer is passed after the sample rate.
// mReverb will be set using this sample rate when the buffer is received.
AdjustReverb();
break;
default:
NS_ERROR("Bad ConvolverNodeEngine DoubleParameter");
@ -76,7 +75,11 @@ public:
void SetBuffer(already_AddRefed<ThreadSharedFloatArrayBufferList> aBuffer) override
{
mBuffer = aBuffer;
AdjustReverb();
}
void AdjustReverb()
{
// Note about empirical tuning (this is copied from Blink)
// The maximum FFT size affects reverb performance and accuracy.
// If the reverb is single-threaded and processes entirely in the real-time audio thread,