X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=audio_mixer.cpp;h=e4d4cff4b86222e41d6b0d8181b8d519a1f1b6a1;hb=9e93fbea58c068d14dd9dad5d0f5226edeef3395;hp=13532e20a4d506d0fd39b0b46e144599d2b53374;hpb=cf7b9ee186d4ef8e5da0531b75854c97b821be44;p=nageru diff --git a/audio_mixer.cpp b/audio_mixer.cpp index 13532e2..e4d4cff 100644 --- a/audio_mixer.cpp +++ b/audio_mixer.cpp @@ -583,13 +583,12 @@ vector AudioMixer::get_output(double pts, unsigned num_samples, Resamplin // (half-time of 30 seconds). double target_loudness_factor, alpha; double loudness_lu = r128.loudness_M() - ref_level_lufs; - double current_makeup_lu = to_db(final_makeup_gain); target_loudness_factor = final_makeup_gain * from_db(-loudness_lu); - // If we're outside +/- 5 LU uncorrected, we don't count it as + // If we're outside +/- 5 LU (after correction), we don't count it as // a normal signal (probably silence) and don't change the // correction factor; just apply what we already have. - if (fabs(loudness_lu - current_makeup_lu) >= 5.0 || !final_makeup_gain_auto) { + if (fabs(loudness_lu) >= 5.0 || !final_makeup_gain_auto) { alpha = 0.0; } else { // Formula adapted from