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 <pkv@obsproject.com> Signed-off-by: pkv <pkv@obsproject.com>
This commit is contained in:
parent
f625bb579f
commit
50db09760c
1 changed files with 2 additions and 2 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue