pub enum Unit {
Generic,
Decibels,
}Expand description
The unit of this parameter. This signifies how the value displayed to the end user should differ from the actual value used in DSP.
Variants§
Generic
Any kind of unit where the value displayed to the end user is the same value used in the DSP.
Decibels
Signifies that the value displayed to the end user should be in decibels and the value used in the DSP should be in raw amplitude.
In addition, whenever the dB value is less than or equal to -90.0 dB, then the
resulting raw DSP ampilitude value will be clamped to 0.0 (essentially equaling
-infinity dB).
Implementations§
Source§impl Unit
impl Unit
Sourcepub fn unit_to_dsp_f32(&self, value: f32) -> f32
pub fn unit_to_dsp_f32(&self, value: f32) -> f32
Convert the given unit value to the corresponding raw value used in DSP.
This is only effective when this unit is not of type Unit::Generic.
Sourcepub fn dsp_to_unit_f32(&self, dsp_value: f32) -> f32
pub fn dsp_to_unit_f32(&self, dsp_value: f32) -> f32
Convert the given raw DSP value to the corresponding unit value.
This is only effective when this unit is not of type Unit::Generic.
Sourcepub fn unit_to_dsp_f64(&self, value: f64) -> f64
pub fn unit_to_dsp_f64(&self, value: f64) -> f64
Convert the given unit value to the corresponding raw value used in DSP.
This is only effective when this unit is not of type Unit::Generic.
Sourcepub fn dsp_to_unit_f64(&self, dsp_value: f64) -> f64
pub fn dsp_to_unit_f64(&self, dsp_value: f64) -> f64
Convert the given raw DSP value to the corresponding unit value.
This is only effective when this unit is not of type Unit::Generic.