فهرست منبع

obs-filters: Make continuous gain on upward compressor

The upward compressor has a -60 dB threshold to stop increasing the
gain. At the threshold, the gain was not continuous, which is not ideal.

Co-authored-by: pkv <[email protected]>
Signed-off-by: pkv <[email protected]>
(cherry picked from commit 50db09760c1a130730da564c8eea505b25ca9810)
Norihiro Kamae 2 سال پیش
والد
کامیت
6f96ad48ed
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      plugins/obs-filters/expander-filter.c

+ 2 - 2
plugins/obs-filters/expander-filter.c

@@ -351,8 +351,8 @@ static inline void process_sample(size_t idx, float *samples, float *env_buf,
 	float env_db = mul_to_db(env_buf[idx]);
 	float diff = threshold - env_db;
 
-	if (is_upwcomp && env_db <= -60.0f)
-		diff = 0.0f;
+	if (is_upwcomp && env_db <= (threshold - 60.0f) / 2)
+		diff = env_db + 60.0f;
 
 	float gain = diff > 0.0f ? fmaxf(slope * diff, -60.0f) : 0.0f;
 	float prev_gain = gain_db[idx - 1];