pub trait AsyncCaptureBufferStream: Send {
// Required method
fn next_capture_buffer<'a, 'life0, 'async_trait>(
&'a mut self,
_ex: &'life0 dyn AudioStreamsExecutor,
) -> Pin<Box<dyn Future<Output = Result<AsyncCaptureBuffer<'a>, BoxError>> + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn start(&mut self) -> Result<(), BoxError> { ... }
fn stop(&mut self) -> Result<(), BoxError> { ... }
}Required Methods§
fn next_capture_buffer<'a, 'life0, 'async_trait>(
&'a mut self,
_ex: &'life0 dyn AudioStreamsExecutor,
) -> Pin<Box<dyn Future<Output = Result<AsyncCaptureBuffer<'a>, BoxError>> + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn start(&mut self) -> Result<(), BoxError>
fn start(&mut self) -> Result<(), BoxError>
Starts the capture stream.
For stream implementations that require explicit lifecycle management or authorization (e.g. AAudio on Android), this method is called to initiate the stream. It must return promptly and must not wait for external events (such as a user permission prompt), because no capture periods are produced while it runs. Default implementation is a no-op.