[−][src]Struct alsa::pcm::PCM
snd_pcm_t wrapper - start here for audio playback and recording
Methods
impl PCM
[src]
pub fn new(name: &str, dir: Direction, nonblock: bool) -> Result<PCM>
[src]
Wrapper around open that takes a &str instead of a &CStr
pub fn open(name: &CStr, dir: Direction, nonblock: bool) -> Result<PCM>
[src]
pub fn start(&self) -> Result<()>
[src]
pub fn drop(&self) -> Result<()>
[src]
pub fn pause(&self, pause: bool) -> Result<()>
[src]
pub fn resume(&self) -> Result<()>
[src]
pub fn drain(&self) -> Result<()>
[src]
pub fn prepare(&self) -> Result<()>
[src]
pub fn reset(&self) -> Result<()>
[src]
pub fn recover(&self, err: c_int, silent: bool) -> Result<()>
[src]
pub fn try_recover(&self, err: Error, silent: bool) -> Result<()>
[src]
Wrapper around snd_pcm_recover.
Returns Ok if the error was successfully recovered from, or the original error if the error was unhandled.
pub fn wait(&self, timeout_ms: Option<u32>) -> Result<bool>
[src]
pub fn state(&self) -> State
[src]
pub fn bytes_to_frames(&self, i: isize) -> Frames
[src]
pub fn frames_to_bytes(&self, i: Frames) -> isize
[src]
pub fn avail_update(&self) -> Result<Frames>
[src]
pub fn avail(&self) -> Result<Frames>
[src]
pub fn avail_delay(&self) -> Result<(Frames, Frames)>
[src]
pub fn status(&self) -> Result<Status>
[src]
pub fn io_i8<'a>(&'a self) -> Result<IO<'a, i8>>
[src]
pub fn io_u8<'a>(&'a self) -> Result<IO<'a, u8>>
[src]
pub fn io_i16<'a>(&'a self) -> Result<IO<'a, i16>>
[src]
pub fn io_u16<'a>(&'a self) -> Result<IO<'a, u16>>
[src]
pub fn io_i32<'a>(&'a self) -> Result<IO<'a, i32>>
[src]
pub fn io_u32<'a>(&'a self) -> Result<IO<'a, u32>>
[src]
pub fn io_f32<'a>(&'a self) -> Result<IO<'a, f32>>
[src]
pub fn io_f64<'a>(&'a self) -> Result<IO<'a, f64>>
[src]
ⓘImportant traits for IO<'a, S>pub fn io<'a>(&'a self) -> IO<'a, u8>
[src]
ⓘImportant traits for IO<'a, S>
pub fn direct_mmap_capture<S>(&self) -> Result<MmapCapture<S>>
[src]
Read buffers by talking to the kernel directly, bypassing alsa-lib.
pub fn direct_mmap_playback<S>(&self) -> Result<MmapPlayback<S>>
[src]
Write buffers by talking to the kernel directly, bypassing alsa-lib.
pub fn hw_params(&self, h: &HwParams) -> Result<()>
[src]
Sets hw parameters. Note: No IO object can exist for this PCM when hw parameters are set.
pub fn hw_params_current<'a>(&'a self) -> Result<HwParams<'a>>
[src]
Retreive current PCM hardware configuration.
pub fn sw_params(&self, h: &SwParams) -> Result<()>
[src]
pub fn sw_params_current<'a>(&'a self) -> Result<SwParams<'a>>
[src]
pub fn get_params(&self) -> Result<(u64, u64)>
[src]
Wraps snd_pcm_get_params
, returns (buffer_size, period_size)
.
pub fn info(&self) -> Result<Info>
[src]
pub fn dump(&self, o: &mut Output) -> Result<()>
[src]
pub fn dump_hw_setup(&self, o: &mut Output) -> Result<()>
[src]
pub fn dump_sw_setup(&self, o: &mut Output) -> Result<()>
[src]
ⓘImportant traits for ChmapsQuerypub fn query_chmaps(&self) -> ChmapsQuery
[src]
ⓘImportant traits for ChmapsQuery
pub fn set_chmap(&self, c: &Chmap) -> Result<()>
[src]
pub fn get_chmap(&self) -> Result<Chmap>
[src]
pub fn link(&self, other: &PCM) -> Result<()>
[src]
pub fn unlink(&self) -> Result<()>
[src]
Trait Implementations
impl Descriptors for PCM
[src]
fn count(&self) -> usize
[src]
fn fill(&self, p: &mut [pollfd]) -> Result<usize>
[src]
fn revents(&self, p: &[pollfd]) -> Result<Flags>
[src]
fn get(&self) -> Result<Vec<pollfd>>
[src]
impl Drop for PCM
[src]
impl Send for PCM
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> 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>,