pub struct DbInterval {
pub min: i32,
pub max: i32,
pub linear: bool,
pub mute_avail: bool,
}Expand description
The data to express dB interval in TLV (Type-Length-Value) of ALSA control interface.
It has three variants below;
- SNDRV_CTL_TLVT_DB_LINEAR(=2)
- SNDRV_CTL_TLVT_DB_MINMAX(=4)
- SNDRV_CTL_TLVT_DB_MINMAX_MUTE(=5)
All of them have two elements in value field.
Fields§
§min: i32The minimum value by dB expression, in 0.1 dB unit. This corresponds to the minimum value in the state of control element.
max: i32The maximum value by dB expression, 0.1 dB unit. This corresponds to the maximum value in the state of control element.
linear: boolIf true, the value in the state of control element increases linearly, thus need calculation to convert to the value by dB expression. The calculation shall be:
20 * log10( current_value / ( maximum_value - minimum_value ) ) (* 100 in 0.1dB unit)
Else, the value in the state of control element corresponds to dB expression itself.
mute_avail: boolIf true, the value less than or equals to CTL_VALUE_MUTE (=-9999999) is available to
mute the control element explicitly.
Trait Implementations§
Source§impl Clone for DbInterval
impl Clone for DbInterval
Source§fn clone(&self) -> DbInterval
fn clone(&self) -> DbInterval
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more