pub trait BufferSet {
    // Required methods
    fn callback(&mut self, offset: usize, frames: usize) -> Result<(), BoxError>;
    fn ignore(&mut self) -> Result<(), BoxError>;
}
Expand description

BufferSet is used as a callback mechanism for ServerRequest objects. It is meant to be implemented by the audio stream, allowing arbitrary code to be run after a buffer offset and length is set.

Required Methods§

source

fn callback(&mut self, offset: usize, frames: usize) -> Result<(), BoxError>

Called when the client sets a buffer offset and length.

offset is the offset within shared memory of the buffer and frames indicates the number of audio frames that can be read from or written to the buffer.

source

fn ignore(&mut self) -> Result<(), BoxError>

Called when the client ignores a request from the server.

Implementors§