[][src]Struct alsa::pcm::PCM

pub struct 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]

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 ChmapsQuery
pub fn query_chmaps(&self) -> ChmapsQuery[src]

pub fn set_chmap(&self, c: &Chmap) -> Result<()>[src]

pub fn get_chmap(&self) -> Result<Chmap>[src]

Trait Implementations

impl Descriptors for PCM[src]

impl Drop for PCM[src]

impl Send for PCM[src]

Auto Trait Implementations

impl !RefUnwindSafe for PCM

impl !Sync for PCM

impl Unpin for PCM

impl UnwindSafe for PCM

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.