pub trait PlaybackBufferWriter {
    // Required methods
    fn new(guest_period_bytes: usize) -> Self
       where Self: Sized;
    fn endpoint_period_bytes(&self) -> usize;

    // Provided method
    fn copy_to_buffer(
        &mut self,
        dst_buf: &mut AsyncPlaybackBuffer<'_>,
        reader: &mut Reader
    ) -> Result<usize, Error> { ... }
}
Expand description

Trait to wrap system specific helpers for writing to endpoint playback buffers.

Required Methods§

source

fn new(guest_period_bytes: usize) -> Self
where Self: Sized,

source

fn endpoint_period_bytes(&self) -> usize

Returns the period of the endpoint device.

Provided Methods§

source

fn copy_to_buffer( &mut self, dst_buf: &mut AsyncPlaybackBuffer<'_>, reader: &mut Reader ) -> Result<usize, Error>

Read audio samples from the tx virtqueue.

Implementors§