pub struct DbScale {
pub min: i32,
pub step: u16,
pub mute_avail: bool,
}
Expand description
The data to express dB scale in TLV (Type-Length-Value) of ALSA control interface.
It has SNDRV_CTL_TLVT_DB_SCALE
(=1) in its type field and has two elements in value field.
Fields§
§min: i32
The minimum value by dB expression, in 0.1 dB unit. This corresponds to the minimum value in the state of control element.
step: u16
The step by dB expression, in 0.1 dB unit. This corresponds to one increase of the value in the state of control element.
mute_avail: bool
If true, the value less than or equals to CTL_VALUE_MUTE
(=-9999999) is available to
mute the control element explicitly.
Trait Implementations§
Source§impl<'a> TlvData<'a> for DbScale
impl<'a> TlvData<'a> for DbScale
Source§fn value_type(&self) -> u32
fn value_type(&self) -> u32
Return the value of type field. It should come from UAPI of Linux kernel.
Source§fn value_length(&self) -> usize
fn value_length(&self) -> usize
Return the length of value field. It should be in byte unit and multiples of 4 as result.
Source§impl ToDbInterval for DbScale
impl ToDbInterval for DbScale
fn to_dbinterval( &self, range: &ValueRange, ) -> Result<DbInterval, ToDbIntervalError>
Source§impl ToValueRange for DbScale
impl ToValueRange for DbScale
fn to_valuerange(&self, range: &ValueRange) -> Option<ValueRange>
impl Copy for DbScale
impl Eq for DbScale
impl StructuralPartialEq for DbScale
Auto Trait Implementations§
impl Freeze for DbScale
impl RefUnwindSafe for DbScale
impl Send for DbScale
impl Sync for DbScale
impl Unpin for DbScale
impl UnwindSafe for DbScale
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more