pub trait PlaybackBufferStream: Send {
    // Required method
    fn next_playback_buffer<'b, 's: 'b>(
        &'s mut self
    ) -> Result<PlaybackBuffer<'b>, BoxError>;

    // Provided method
    fn write_playback_buffer<'b, 's: 'b>(
        &'s mut self,
        f: &mut dyn FnMut(&mut PlaybackBuffer<'b>) -> Result<(), BoxError>
    ) -> Result<(), BoxError> { ... }
}
Expand description

PlaybackBufferStream provides PlaybackBuffers to fill with audio samples for playback.

Required Methods§

source

fn next_playback_buffer<'b, 's: 'b>( &'s mut self ) -> Result<PlaybackBuffer<'b>, BoxError>

Provided Methods§

source

fn write_playback_buffer<'b, 's: 'b>( &'s mut self, f: &mut dyn FnMut(&mut PlaybackBuffer<'b>) -> Result<(), BoxError> ) -> Result<(), BoxError>

Call f with a PlaybackBuffer, and trigger the buffer done call back after. f should write playback data to the given PlaybackBuffer.

Implementations on Foreign Types§

source§

impl<S: PlaybackBufferStream + ?Sized> PlaybackBufferStream for &mut S

source§

fn next_playback_buffer<'b, 's: 'b>( &'s mut self ) -> Result<PlaybackBuffer<'b>, BoxError>

Implementors§