mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Use db_to_gain_fast() in plugins
This commit is contained in:
@@ -881,9 +881,9 @@ impl CompressorBank {
|
||||
|
||||
// This threshold must never reach zero as it's used in divisions to get a gain ratio
|
||||
// above the threshold
|
||||
*threshold = util::db_to_gain(threshold_db).max(f32::EPSILON);
|
||||
*knee_start = util::db_to_gain(knee_start_db).max(f32::EPSILON);
|
||||
*knee_end = util::db_to_gain(knee_end_db).max(f32::EPSILON);
|
||||
*threshold = util::db_to_gain_fast(threshold_db);
|
||||
*knee_start = util::db_to_gain_fast(knee_start_db);
|
||||
*knee_end = util::db_to_gain_fast(knee_end_db);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -910,9 +910,9 @@ impl CompressorBank {
|
||||
let knee_end_db =
|
||||
threshold_db + (params.compressors.upwards.knee_width_db.value() / 2.0);
|
||||
|
||||
*threshold = util::db_to_gain(threshold_db).max(f32::EPSILON);
|
||||
*knee_start = util::db_to_gain(knee_start_db).max(f32::EPSILON);
|
||||
*knee_end = util::db_to_gain(knee_end_db).max(f32::EPSILON);
|
||||
*threshold = util::db_to_gain_fast(threshold_db);
|
||||
*knee_start = util::db_to_gain_fast(knee_start_db);
|
||||
*knee_end = util::db_to_gain_fast(knee_end_db);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user