[][src]Struct alsa::direct::pcm::MmapIO

pub struct MmapIO<S, D> { /* fields omitted */ }

Struct containing direct I/O functions shared between playback and capture.

Methods

impl<S, D: MmapDir> MmapIO<S, D>[src]

pub fn status(&self) -> &Status[src]

Read current status

pub fn appl_ptr(&self) -> Frames[src]

Read current number of frames committed by application

This number wraps at 'boundary'.

pub fn hw_ptr(&self) -> Frames[src]

Read current number of frames read / written by hardware

This number wraps at 'boundary'.

pub fn boundary(&self) -> Frames[src]

The number at which hw_ptr and appl_ptr wraps.

pub fn buffer_size(&self) -> Frames[src]

Total number of frames in hardware buffer

pub fn channels(&self) -> u32[src]

Number of channels in stream

pub fn commit(&self, v: Frames)[src]

Notifies the kernel that frames have now been read / written by the application

This will allow the kernel to write new data into this part of the buffer.

pub fn avail(&self) -> Frames[src]

Number of frames available to read / write.

In case of an underrun, this value might be bigger than the buffer size.

pub fn data_ptr(&self) -> (RawSamples<S>, Option<RawSamples<S>>)[src]

Returns raw pointers to data to read / write.

Use this if you want to read/write data yourself (instead of using iterators). If you do, using write_volatile or read_volatile is recommended, since it's DMA memory and can change at any time.

Since this is a ring buffer, there might be more data to read/write in the beginning of the buffer as well. If so this is returned as the second return value.

Trait Implementations

impl<S: Debug, D: Debug> Debug for MmapIO<S, D>[src]

Auto Trait Implementations

impl<S, D> !Send for MmapIO<S, D>

impl<S, D> !Sync for MmapIO<S, D>

Blanket Implementations

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.

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

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

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