[−][src]Struct alsa::direct::pcm::MmapIO
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
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,