[−][src]Struct alsa::Ctl
snd_ctl_t wrapper
Methods
impl Ctl
[src]
pub fn new(c: &str, nonblock: bool) -> Result<Self>
[src]
Wrapper around open that takes a &str instead of a &CStr
pub fn open(c: &CStr, nonblock: bool) -> Result<Ctl>
[src]
Open does not support async mode (it's not very Rustic anyway)
pub fn from_card(c: &Card, nonblock: bool) -> Result<Ctl>
[src]
pub fn card_info(&self) -> Result<CardInfo>
[src]
pub fn wait(&self, timeout_ms: Option<u32>) -> Result<bool>
[src]
pub fn get_db_range(&self, id: &ElemId) -> Result<(MilliBel, MilliBel)>
[src]
pub fn convert_to_db(&self, id: &ElemId, volume: i64) -> Result<MilliBel>
[src]
pub fn convert_from_db(
&self,
id: &ElemId,
mb: MilliBel,
dir: Round
) -> Result<i64>
[src]
&self,
id: &ElemId,
mb: MilliBel,
dir: Round
) -> Result<i64>
pub fn subscribe_events(&self, subscribe: bool) -> Result<()>
[src]
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>>
[src]
Trait Implementations
impl PollDescriptors for Ctl
[src]
fn count(&self) -> usize
[src]
fn fill(&self, p: &mut [pollfd]) -> Result<usize>
[src]
fn revents(&self, p: &[pollfd]) -> Result<PollFlags>
[src]
fn get(&self) -> Result<Vec<pollfd>>
[src]
Wrapper around count and fill - returns an array of pollfds
impl Drop for Ctl
[src]
impl Send for Ctl
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,