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

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

CaptureBufferStream provides CaptureBuffers to read with audio samples from capture.

Required Methods§

source

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

Provided Methods§

source

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

Call f with a CaptureBuffer, and trigger the buffer done call back after. f can read the capture data from the given CaptureBuffer.

Implementations on Foreign Types§

source§

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

source§

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

Implementors§