X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=mixer.h;h=682aea4dc24902b6343659867a61e855f7ec0e5c;hb=a76872873dda7a4fc9f41972486c234699f43b23;hp=db6db15155bacb85fd0fe011296cf770422039f5;hpb=c9dffdd52a4847c6cf5590e8c45d1cf5ee6177d3;p=nageru diff --git a/mixer.h b/mixer.h index db6db15..682aea4 100644 --- a/mixer.h +++ b/mixer.h @@ -169,6 +169,11 @@ public: compressor_enabled = enabled; } + void set_gainstaging_auto(bool enabled) + { + level_compressor = enabled; + } + void schedule_cut() { should_cut = true; @@ -272,6 +277,7 @@ private: // First compressor; takes us up to about -12 dBFS. StereoCompressor level_compressor; float last_gain_staging_db = 0.0f; + std::atomic level_compressor_enabled{true}; static constexpr float ref_level_dbfs = -14.0f;