pub struct Capture {
stop: Arc<AtomicBool>,
reader: Option<JoinHandle<()>>,
device: Device,
}Expand description
A live capture: the device is open and on_block is being fed.
The stream itself lives on the reader thread, because cpal::Stream is
neither Send nor Sync and dropping it is what releases the device.
Fields§
§stop: Arc<AtomicBool>§reader: Option<JoinHandle<()>>§device: DeviceThe input this capture is recording from, as open resolved it:
the system default when the caller named none.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Capture
impl !UnwindSafe for Capture
impl Freeze for Capture
impl Send for Capture
impl Sync for Capture
impl Unpin for Capture
impl UnsafeUnpin for Capture
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more