Struct alsa::mixer::Selem
[−]
[src]
pub struct Selem<'a>(_);
Wraps an Elem as a Selem
Methods
impl<'a> Selem<'a>
[src]
fn new(elem: Elem<'a>) -> Option<Selem<'a>>
Creates a Selem by wrapping elem
.
fn register(mixer: &mut Mixer) -> Result<()>
TODO: This function might change to support regopt and to return the mixer class
fn get_id(&self) -> SelemId
fn has_capture_volume(&self) -> bool
fn has_capture_switch(&self) -> bool
fn has_playback_volume(&self) -> bool
fn has_playback_switch(&self) -> bool
fn can_capture(&self) -> bool
fn can_playback(&self) -> bool
fn has_volume(&self) -> bool
fn get_capture_volume_range(&self) -> (i64, i64)
returns range for capture volume as (min, max) values
fn get_capture_db_range(&self) -> (MilliBel, MilliBel)
returns (min, max) values.
fn get_playback_volume_range(&self) -> (i64, i64)
returns (min, max) values.
fn get_playback_db_range(&self) -> (MilliBel, MilliBel)
returns (min, max) values.
fn is_playback_mono(&self) -> bool
fn has_capture_channel(&self, channel: SelemChannelId) -> bool
fn has_playback_channel(&self, channel: SelemChannelId) -> bool
fn channel_name(channel: SelemChannelId) -> Result<&'static str>
Gets name from snd_mixer_selem_channel_name
fn get_playback_volume(&self, channel: SelemChannelId) -> Result<i64>
fn get_playback_vol_db(&self, channel: SelemChannelId) -> Result<MilliBel>
returns volume in millibels.
fn ask_playback_vol_db(&self, volume: i64) -> Result<MilliBel>
Asks alsa to convert playback volume to millibels.
fn get_capture_volume(&self, channel: SelemChannelId) -> Result<i64>
fn get_capture_vol_db(&self, channel: SelemChannelId) -> Result<MilliBel>
returns volume in millibels.
fn ask_capture_vol_db(&self, volume: i64) -> Result<MilliBel>
Asks alsa to convert capture volume to millibels
fn set_playback_volume(&self, channel: SelemChannelId, value: i64) -> Result<()>
fn set_playback_volume_all(&self, value: i64) -> Result<()>
fn set_playback_db(
&self,
channel: SelemChannelId,
value: MilliBel,
dir: Round
) -> Result<()>
&self,
channel: SelemChannelId,
value: MilliBel,
dir: Round
) -> Result<()>
fn set_capture_db(
&self,
channel: SelemChannelId,
value: MilliBel,
dir: Round
) -> Result<()>
&self,
channel: SelemChannelId,
value: MilliBel,
dir: Round
) -> Result<()>
fn set_playback_db_all(&self, value: MilliBel, dir: Round) -> Result<()>
fn set_capture_db_all(&self, value: MilliBel, dir: Round) -> Result<()>
fn set_capture_volume(&self, channel: SelemChannelId, value: i64) -> Result<()>
fn set_playback_switch(&self, channel: SelemChannelId, value: i32) -> Result<()>
fn set_playback_switch_all(&self, value: i32) -> Result<()>
fn set_capture_switch(&self, channel: SelemChannelId, value: i32) -> Result<()>
fn set_capture_switch_all(&self, value: i32) -> Result<()>
fn get_playback_switch(&self, channel: SelemChannelId) -> Result<i32>
fn get_capture_switch(&self, channel: SelemChannelId) -> Result<i32>
fn is_enumerated(&self) -> bool
fn is_enum_playback(&self) -> bool
fn is_enum_capture(&self) -> bool
fn get_enum_items(&self) -> Result<u32>
fn get_enum_item_name(&self, idx: u32) -> Result<String>
fn iter_enum(&self) -> Result<IterEnum>
Enumerates over valid Enum values