зеркало из https://github.com/mozilla/gecko-dev.git
bug 1389641 adjust ConvolverNode buffer normalization gain calibration to match spec r=padenot
This reduces the amplitude by about 0.7%. MozReview-Commit-ID: 7vTNg2oUXEf --HG-- extra : rebase_source : 4cff5189665396d427c7e6c842a9a002a1734ae5
This commit is contained in:
Родитель
5f85b81a36
Коммит
80d9b272ad
|
@ -38,7 +38,7 @@ using namespace mozilla;
|
|||
namespace WebCore {
|
||||
|
||||
// Empirical gain calibration tested across many impulse responses to ensure perceived volume is same as dry (unprocessed) signal
|
||||
const float GainCalibration = -58;
|
||||
const float GainCalibration = 0.00125;
|
||||
const float GainCalibrationSampleRate = 44100;
|
||||
|
||||
// A minimum power value to when normalizing a silent (or very quiet) impulse response
|
||||
|
@ -64,7 +64,7 @@ static float calculateNormalizationScale(ThreadSharedFloatArrayBufferList* respo
|
|||
|
||||
float scale = 1 / power;
|
||||
|
||||
scale *= powf(10, GainCalibration * 0.05f); // calibrate to make perceived volume same as unprocessed
|
||||
scale *= GainCalibration; // calibrate to make perceived volume same as unprocessed
|
||||
|
||||
// Scale depends on sample-rate.
|
||||
if (sampleRate)
|
||||
|
|
Загрузка…
Ссылка в новой задаче