pub fn open(
device: Option<&str>,
on_block: impl FnMut(Block<'_>) + Send + 'static,
) -> Result<Capture, Error>Expand description
Open the named input (or the system default) and feed on_block its
audio, already mono at SAMPLE_RATE, until the capture is stopped.
The device is opened and the stream started before this returns, so a device that will not open is an error here rather than silence later.