pub struct Ctl(/* private fields */);
Expand description
snd_ctl_t wrapper
Implementations§
source§impl Ctl
impl Ctl
sourcepub fn new(c: &str, nonblock: bool) -> Result<Self>
pub fn new(c: &str, nonblock: bool) -> Result<Self>
Wrapper around open that takes a &str instead of a &CStr
sourcepub fn open(c: &CStr, nonblock: bool) -> Result<Ctl>
pub fn open(c: &CStr, nonblock: bool) -> Result<Ctl>
Open does not support async mode (it’s not very Rustic anyway)
pub fn from_card(c: &Card, nonblock: bool) -> Result<Ctl>
pub fn card_info(&self) -> Result<CardInfo>
pub fn wait(&self, timeout_ms: Option<u32>) -> Result<bool>
pub fn get_db_range(&self, id: &ElemId) -> Result<(MilliBel, MilliBel)>
pub fn convert_to_db(&self, id: &ElemId, volume: i64) -> Result<MilliBel>
pub fn convert_from_db( &self, id: &ElemId, mb: MilliBel, dir: Round ) -> Result<i64>
pub fn elem_read(&self, val: &mut ElemValue) -> Result<()>
pub fn elem_write(&self, val: &ElemValue) -> Result<()>
sourcepub fn subscribe_events(&self, subscribe: bool) -> Result<()>
pub fn subscribe_events(&self, subscribe: bool) -> Result<()>
Note: According to alsa-lib documentation, you’re also supposed to have functionality for returning whether or not you are subscribed. This does not work in practice, so I’m not including that here.
pub fn read(&self) -> Result<Option<Event>>
pub fn pcm_info( &self, device: u32, subdevice: u32, direction: Direction ) -> Result<Info>
Trait Implementations§
Auto Trait Implementations§
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