pub struct CaptureMeter {
recording: Arc<Recording>,
}Expand description
The polling view of a live capture: the level read and the cap
flag, over a shared handle to the recording. Sync and Send, so
an async host can hold it across await points.
Fields§
§recording: Arc<Recording>Implementations§
Source§impl CaptureMeter
impl CaptureMeter
Sourcepub fn level(&self) -> f32
pub fn level(&self) -> f32
Loudest input since the last read, in dBFS. Take-and-reset, as
Capture::level - the handle shares the recording’s
accumulator, so exactly one poller should read it.
Sourcepub fn was_truncated(&self) -> bool
pub fn was_truncated(&self) -> bool
Whether the capture reached Config::max_capture and stopped
itself.
Sourcepub fn cap_reached(&self)
pub fn cap_reached(&self)
Stop the take at its cap, flagging it truncated. For a take fed by frames, whose host counts the clock: nothing else notices the cap when the audio stops arriving.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CaptureMeter
impl RefUnwindSafe for CaptureMeter
impl Send for CaptureMeter
impl Sync for CaptureMeter
impl Unpin for CaptureMeter
impl UnsafeUnpin for CaptureMeter
impl UnwindSafe for CaptureMeter
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