pub struct WaveformSummary { /* private fields */ }Expand description
Builds a Waveform from planar samples streamed in blocks.
Implementations§
Source§impl WaveformSummary
impl WaveformSummary
Sourcepub fn new(
channels: usize,
base_bucket: usize,
levels: usize,
) -> Result<Self, WaveformError>
pub fn new( channels: usize, base_bucket: usize, levels: usize, ) -> Result<Self, WaveformError>
A summary of channels channels with base_bucket samples per finest bucket and
levels levels.
§Errors
Returns WaveformError::InvalidShape for zero channels, a zero bucket, or a level count
outside 1..=MAX_WAVEFORM_LEVELS.
Sourcepub fn push(&mut self, planes: &[&[f32]]) -> Result<(), WaveformError>
pub fn push(&mut self, planes: &[&[f32]]) -> Result<(), WaveformError>
Adds one block of equal-length planes.
§Errors
Returns WaveformError::MismatchedBlock for another channel count or ragged planes.
Trait Implementations§
Source§impl Clone for WaveformSummary
impl Clone for WaveformSummary
Auto Trait Implementations§
impl Freeze for WaveformSummary
impl RefUnwindSafe for WaveformSummary
impl Send for WaveformSummary
impl Sync for WaveformSummary
impl Unpin for WaveformSummary
impl UnsafeUnpin for WaveformSummary
impl UnwindSafe for WaveformSummary
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