pub struct Selem<'a>(/* private fields */);
Expand description
Wraps an Elem as a Selem
Implementations§
source§impl<'a> Selem<'a>
impl<'a> Selem<'a>
sourcepub fn register(mixer: &mut Mixer) -> Result<()>
pub fn register(mixer: &mut Mixer) -> Result<()>
TODO: This function might change to support regopt and to return the mixer class
pub fn get_id(&self) -> SelemId
pub fn has_capture_volume(&self) -> bool
pub fn has_capture_switch(&self) -> bool
pub fn has_playback_volume(&self) -> bool
pub fn has_playback_switch(&self) -> bool
pub fn can_capture(&self) -> bool
pub fn can_playback(&self) -> bool
pub fn has_volume(&self) -> bool
sourcepub fn get_capture_volume_range(&self) -> (i64, i64)
pub fn get_capture_volume_range(&self) -> (i64, i64)
returns range for capture volume as (min, max) values
sourcepub fn get_capture_db_range(&self) -> (MilliBel, MilliBel)
pub fn get_capture_db_range(&self) -> (MilliBel, MilliBel)
returns (min, max) values.
sourcepub fn get_playback_volume_range(&self) -> (i64, i64)
pub fn get_playback_volume_range(&self) -> (i64, i64)
returns (min, max) values.
sourcepub fn get_playback_db_range(&self) -> (MilliBel, MilliBel)
pub fn get_playback_db_range(&self) -> (MilliBel, MilliBel)
returns (min, max) values.
pub fn is_capture_mono(&self) -> bool
pub fn is_playback_mono(&self) -> bool
pub fn has_capture_channel(&self, channel: SelemChannelId) -> bool
pub fn has_playback_channel(&self, channel: SelemChannelId) -> bool
sourcepub fn channel_name(channel: SelemChannelId) -> Result<&'static str>
pub fn channel_name(channel: SelemChannelId) -> Result<&'static str>
Gets name from snd_mixer_selem_channel_name
pub fn get_playback_volume(&self, channel: SelemChannelId) -> Result<i64>
sourcepub fn get_playback_vol_db(&self, channel: SelemChannelId) -> Result<MilliBel>
pub fn get_playback_vol_db(&self, channel: SelemChannelId) -> Result<MilliBel>
returns volume in millibels.
sourcepub fn ask_playback_vol_db(&self, volume: i64) -> Result<MilliBel>
pub fn ask_playback_vol_db(&self, volume: i64) -> Result<MilliBel>
Asks alsa to convert playback volume to millibels.
pub fn ask_playback_db_vol(&self, db: MilliBel, dir: Round) -> Result<i64>
pub fn get_capture_volume(&self, channel: SelemChannelId) -> Result<i64>
sourcepub fn get_capture_vol_db(&self, channel: SelemChannelId) -> Result<MilliBel>
pub fn get_capture_vol_db(&self, channel: SelemChannelId) -> Result<MilliBel>
returns volume in millibels.
sourcepub fn ask_capture_vol_db(&self, volume: i64) -> Result<MilliBel>
pub fn ask_capture_vol_db(&self, volume: i64) -> Result<MilliBel>
Asks alsa to convert capture volume to millibels
pub fn ask_capture_db_vol(&self, db: MilliBel, dir: Round) -> Result<i64>
pub fn set_playback_volume( &self, channel: SelemChannelId, value: i64 ) -> Result<()>
pub fn set_playback_volume_range(&self, min: i64, max: i64) -> Result<()>
pub fn set_playback_volume_all(&self, value: i64) -> Result<()>
pub fn set_playback_db( &self, channel: SelemChannelId, value: MilliBel, dir: Round ) -> Result<()>
pub fn set_capture_db( &self, channel: SelemChannelId, value: MilliBel, dir: Round ) -> Result<()>
pub fn set_playback_db_all(&self, value: MilliBel, dir: Round) -> Result<()>
pub fn set_capture_db_all(&self, value: MilliBel, dir: Round) -> Result<()>
pub fn set_capture_volume( &self, channel: SelemChannelId, value: i64 ) -> Result<()>
pub fn set_capture_volume_range(&self, min: i64, max: i64) -> Result<()>
pub fn set_capture_volume_all(&self, value: i64) -> Result<()>
pub fn set_playback_switch( &self, channel: SelemChannelId, value: i32 ) -> Result<()>
pub fn set_playback_switch_all(&self, value: i32) -> Result<()>
pub fn set_capture_switch( &self, channel: SelemChannelId, value: i32 ) -> Result<()>
pub fn set_capture_switch_all(&self, value: i32) -> Result<()>
pub fn get_playback_switch(&self, channel: SelemChannelId) -> Result<i32>
pub fn get_capture_switch(&self, channel: SelemChannelId) -> Result<i32>
pub fn is_enumerated(&self) -> bool
pub fn is_enum_playback(&self) -> bool
pub fn is_enum_capture(&self) -> bool
pub fn get_enum_items(&self) -> Result<u32>
pub fn get_enum_item_name(&self, idx: u32) -> Result<String>
pub fn get_enum_item(&self, channel: SelemChannelId) -> Result<u32>
pub fn set_enum_item(&self, channel: SelemChannelId, idx: u32) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Selem<'a>
impl<'a> !Send for Selem<'a>
impl<'a> !Sync for Selem<'a>
impl<'a> Unpin for Selem<'a>
impl<'a> UnwindSafe for Selem<'a>
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