]> git.sesse.net Git - nageru/commitdiff
Fix a bug where the automatic makeup gain adjustment would never quite get to the...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 29 Jul 2016 18:34:22 +0000 (20:34 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 19 Oct 2016 22:55:44 +0000 (00:55 +0200)
audio_mixer.cpp

index 06c7f870fcae75203eb75749ebf8c568e44d5bf9..3629d7414479de5f6bf308d5f59d3b9ee1f71755 100644 (file)
@@ -231,7 +231,7 @@ vector<float> AudioMixer::get_output(double pts, unsigned num_samples, Resamplin
        double target_loudness_factor, alpha;
        double loudness_lu = loudness_lufs - ref_level_lufs;
        double current_makeup_lu = to_db(final_makeup_gain);
-       target_loudness_factor = from_db(-loudness_lu);
+       target_loudness_factor = final_makeup_gain * from_db(-loudness_lu);
 
        // If we're outside +/- 5 LU uncorrected, we don't count it as
        // a normal signal (probably silence) and don't change the