Trait devices::virtio::snd::common_backend::async_funcs::PlaybackBufferWriter
source · 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§
fn new(guest_period_bytes: usize) -> Selfwhere
Self: Sized,
sourcefn endpoint_period_bytes(&self) -> usize
fn endpoint_period_bytes(&self) -> usize
Returns the period of the endpoint device.
Provided Methods§
sourcefn copy_to_buffer(
&mut self,
dst_buf: &mut AsyncPlaybackBuffer<'_>,
reader: &mut Reader
) -> Result<usize, Error>
fn copy_to_buffer( &mut self, dst_buf: &mut AsyncPlaybackBuffer<'_>, reader: &mut Reader ) -> Result<usize, Error>
Read audio samples from the tx virtqueue.