Trait audio_streams::capture::CaptureBufferStream
source · 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 CaptureBuffer
s to read with audio samples from capture.
Required Methods§
fn next_capture_buffer<'b, 's: 'b>( &'s mut self ) -> Result<CaptureBuffer<'b>, BoxError>
Provided Methods§
sourcefn read_capture_buffer<'b, 's: 'b>(
&'s mut self,
f: &mut dyn FnMut(&mut CaptureBuffer<'b>) -> Result<(), BoxError>
) -> Result<(), BoxError>
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
.