[−][src]Struct alsa::mixer::Selem
Wraps an Elem as a Selem
Methods
impl<'a> Selem<'a>
[src]
pub fn new(elem: Elem<'a>) -> Option<Selem<'a>>
[src]
Creates a Selem by wrapping elem
.
pub fn register(mixer: &mut Mixer) -> Result<()>
[src]
TODO: This function might change to support regopt and to return the mixer class
pub fn get_id(&self) -> SelemId
[src]
pub fn has_capture_volume(&self) -> bool
[src]
pub fn has_capture_switch(&self) -> bool
[src]
pub fn has_playback_volume(&self) -> bool
[src]
pub fn has_playback_switch(&self) -> bool
[src]
pub fn can_capture(&self) -> bool
[src]
pub fn can_playback(&self) -> bool
[src]
pub fn has_volume(&self) -> bool
[src]
pub fn get_capture_volume_range(&self) -> (i64, i64)
[src]
returns range for capture volume as (min, max) values
pub fn get_capture_db_range(&self) -> (MilliBel, MilliBel)
[src]
returns (min, max) values.
pub fn get_playback_volume_range(&self) -> (i64, i64)
[src]
returns (min, max) values.
pub fn get_playback_db_range(&self) -> (MilliBel, MilliBel)
[src]
returns (min, max) values.
pub fn is_playback_mono(&self) -> bool
[src]
pub fn has_capture_channel(&self, channel: SelemChannelId) -> bool
[src]
pub fn has_playback_channel(&self, channel: SelemChannelId) -> bool
[src]
pub fn channel_name(channel: SelemChannelId) -> Result<&'static str>
[src]
Gets name from snd_mixer_selem_channel_name
pub fn get_playback_volume(&self, channel: SelemChannelId) -> Result<i64>
[src]
pub fn get_playback_vol_db(&self, channel: SelemChannelId) -> Result<MilliBel>
[src]
returns volume in millibels.
pub fn ask_playback_vol_db(&self, volume: i64) -> Result<MilliBel>
[src]
Asks alsa to convert playback volume to millibels.
pub fn get_capture_volume(&self, channel: SelemChannelId) -> Result<i64>
[src]
pub fn get_capture_vol_db(&self, channel: SelemChannelId) -> Result<MilliBel>
[src]
returns volume in millibels.
pub fn ask_capture_vol_db(&self, volume: i64) -> Result<MilliBel>
[src]
Asks alsa to convert capture volume to millibels
pub fn set_playback_volume(
&self,
channel: SelemChannelId,
value: i64
) -> Result<()>
[src]
&self,
channel: SelemChannelId,
value: i64
) -> Result<()>
pub fn set_playback_volume_all(&self, value: i64) -> Result<()>
[src]
pub fn set_playback_db(
&self,
channel: SelemChannelId,
value: MilliBel,
dir: Round
) -> Result<()>
[src]
&self,
channel: SelemChannelId,
value: MilliBel,
dir: Round
) -> Result<()>
pub fn set_capture_db(
&self,
channel: SelemChannelId,
value: MilliBel,
dir: Round
) -> Result<()>
[src]
&self,
channel: SelemChannelId,
value: MilliBel,
dir: Round
) -> Result<()>
pub fn set_playback_db_all(&self, value: MilliBel, dir: Round) -> Result<()>
[src]
pub fn set_capture_db_all(&self, value: MilliBel, dir: Round) -> Result<()>
[src]
pub fn set_capture_volume(
&self,
channel: SelemChannelId,
value: i64
) -> Result<()>
[src]
&self,
channel: SelemChannelId,
value: i64
) -> Result<()>
pub fn set_playback_switch(
&self,
channel: SelemChannelId,
value: i32
) -> Result<()>
[src]
&self,
channel: SelemChannelId,
value: i32
) -> Result<()>
pub fn set_playback_switch_all(&self, value: i32) -> Result<()>
[src]
pub fn set_capture_switch(
&self,
channel: SelemChannelId,
value: i32
) -> Result<()>
[src]
&self,
channel: SelemChannelId,
value: i32
) -> Result<()>
pub fn set_capture_switch_all(&self, value: i32) -> Result<()>
[src]
pub fn get_playback_switch(&self, channel: SelemChannelId) -> Result<i32>
[src]
pub fn get_capture_switch(&self, channel: SelemChannelId) -> Result<i32>
[src]
pub fn is_enumerated(&self) -> bool
[src]
pub fn is_enum_playback(&self) -> bool
[src]
pub fn is_enum_capture(&self) -> bool
[src]
pub fn get_enum_items(&self) -> Result<u32>
[src]
pub fn get_enum_item_name(&self, idx: u32) -> Result<String>
[src]
pub fn iter_enum(&self) -> Result<IterEnum>
[src]
Enumerates over valid Enum values
pub fn get_enum_item(&self, channel: SelemChannelId) -> Result<u32>
[src]
pub fn set_enum_item(&self, channel: SelemChannelId, idx: u32) -> Result<()>
[src]
Trait Implementations
Auto Trait Implementations
impl<'a> !Send for Selem<'a>
impl<'a> !Sync for Selem<'a>
impl<'a> Unpin for Selem<'a>
impl<'a> UnwindSafe for Selem<'a>
impl<'a> RefUnwindSafe for Selem<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,