From: Steinar H. Gunderson Date: Mon, 9 Nov 2015 22:00:42 +0000 (+0100) Subject: Tweak the limiter by ear; increase the headroom so it does not trigger as often ... X-Git-Tag: 1.0.0~138 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=3b77fb6a74f7a58033168202a772f3630fb9a30f;p=nageru Tweak the limiter by ear; increase the headroom so it does not trigger as often (we still have 10 dB to go on), and also increase the release time which makes it a lot less ugly. Tested on both music and conference audio. --- diff --git a/mixer.cpp b/mixer.cpp index 861ea94..8ccd7fa 100644 --- a/mixer.cpp +++ b/mixer.cpp @@ -585,7 +585,7 @@ void Mixer::process_audio_one_frame() float threshold = pow(10.0f, limiter_threshold_dbfs / 20.0f); float ratio = 30.0f; float attack_time = 0.0f; // Instant. - float release_time = 0.005f; + float release_time = 0.020f; float makeup_gain = 1.0f; // 0 dB. limiter.process(samples_out.data(), samples_out.size() / 2, threshold, ratio, attack_time, release_time, makeup_gain); // limiter_att = limiter.get_attenuation(); diff --git a/mixer.h b/mixer.h index 64a74e2..252f961 100644 --- a/mixer.h +++ b/mixer.h @@ -257,7 +257,7 @@ private: static constexpr float ref_level_dbfs = -14.0f; StereoCompressor limiter; - std::atomic limiter_threshold_dbfs{ref_level_dbfs + 0.0f}; // 0 dB. + std::atomic limiter_threshold_dbfs{ref_level_dbfs + 4.0f}; // 4 dB. std::atomic limiter_enabled{true}; StereoCompressor compressor; std::atomic compressor_threshold_dbfs{ref_level_dbfs - 12.0f}; // -12 dB.