pub async fn async_write_playback_buffer<F>(
    stream: &mut dyn AsyncPlaybackBufferStream,
    f: F,
    ex: &dyn AudioStreamsExecutor
) -> Result<(), BoxError>
where F: for<'a> FnOnce(&'a mut AsyncPlaybackBuffer<'_>) -> Result<(), BoxError>,
Expand description

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

This cannot be a trait method because trait methods with generic parameters are not object safe.