pub struct Control(/* private fields */);
Expand description
Write PCM appl ptr directly, bypassing alsa-lib.
Provides direct access to appl ptr and avail min, without the overhead of alsa-lib or a syscall. Caveats that apply to Status applies to this struct too.
Implementations§
source§impl Control
impl Control
pub fn new(p: &PCM) -> Result<Self>
pub fn from_fd(fd: RawFd) -> Result<Self>
sourcepub fn appl_ptr(&self) -> Frames
pub fn appl_ptr(&self) -> Frames
Read number of frames application has read or written
This value wraps at “boundary” (a large value you can read from SwParams).
sourcepub fn set_appl_ptr(&self, value: Frames)
pub fn set_appl_ptr(&self, value: Frames)
Set number of frames application has read or written
When the kernel wakes up due to a period interrupt, this value will be checked by the kernel. An XRUN will happen in case the application has not read or written enough data.
sourcepub fn avail_min(&self) -> Frames
pub fn avail_min(&self) -> Frames
Read minimum number of frames in buffer in order to wakeup process
sourcepub fn set_avail_min(&self, value: Frames)
pub fn set_avail_min(&self, value: Frames)
Write minimum number of frames in buffer in order to wakeup process
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Control
impl Send for Control
impl Sync for Control
impl Unpin for Control
impl UnwindSafe for Control
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more