pub struct Block<'a> {
pub samples: &'a [f32],
pub peak: f32,
}Expand description
One block of the device’s audio, as it arrived.
Fields§
§samples: &'a [f32]The samples, downmixed to mono at SAMPLE_RATE. A block is
whatever the device delivered (or what the resampler produced for
it), so a caller that needs a fixed frame size gathers its own.
peak: f32The loudest raw sample of the block, before any downmix, so a meter can show a channel clipping that the mono mix halves.
Auto Trait Implementations§
impl<'a> Freeze for Block<'a>
impl<'a> RefUnwindSafe for Block<'a>
impl<'a> Send for Block<'a>
impl<'a> Sync for Block<'a>
impl<'a> Unpin for Block<'a>
impl<'a> UnsafeUnpin for Block<'a>
impl<'a> UnwindSafe for Block<'a>
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