Assert correct values for gain_skew_factor
This commit is contained in:
parent
2d3b601555
commit
6ee7e8f4e3
|
@ -48,6 +48,8 @@ impl FloatRange {
|
|||
/// Calculate a skew factor for [`FloatRange::Skewed`] that makes a linear gain parameter range
|
||||
/// appear as if it was linear when formatted as decibels.
|
||||
pub fn gain_skew_factor(min_db: f32, max_db: f32) -> f32 {
|
||||
nih_debug_assert!(min_db < max_db);
|
||||
|
||||
let min_gain = util::db_to_gain(min_db);
|
||||
let max_gain = util::db_to_gain(max_db);
|
||||
let middle_db = (max_db + min_db) / 2.0;
|
||||
|
|
Loading…
Reference in a new issue