]> git.sesse.net Git - nageru/commitdiff
Tweak the limiter by ear; increase the headroom so it does not trigger as often ...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 9 Nov 2015 22:00:42 +0000 (23:00 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 9 Nov 2015 22:00:42 +0000 (23:00 +0100)
mixer.cpp
mixer.h

index 861ea94d221bae78c93c06ec41f203aa30cd0905..8ccd7fa0e5d71fbe24a26fd0e8c47b8092df5044 100644 (file)
--- 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 64a74e2f13d855d0030a19645cdadf95956b9558..252f961f7668cbf4ceaeab2364bf2196c799131d 100644 (file)
--- a/mixer.h
+++ b/mixer.h
@@ -257,7 +257,7 @@ private:
        static constexpr float ref_level_dbfs = -14.0f;
 
        StereoCompressor limiter;
-       std::atomic<float> limiter_threshold_dbfs{ref_level_dbfs + 0.0f};   // 0 dB.
+       std::atomic<float> limiter_threshold_dbfs{ref_level_dbfs + 4.0f};   // 4 dB.
        std::atomic<bool> limiter_enabled{true};
        StereoCompressor compressor;
        std::atomic<float> compressor_threshold_dbfs{ref_level_dbfs - 12.0f};  // -12 dB.