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 Forget for WaveformSummary
impl Freeze for WaveformSummarywhere
*const u8 is !null: Freeze,
PhantomData<WaveformLevel>: Freeze,
PhantomData<Vec<Accumulator>>: Freeze,
impl Move for WaveformSummary
impl RefUnwindSafe for WaveformSummary
impl Send for WaveformSummarywhere
RawVecInner: Send,
impl Sync for WaveformSummarywhere
RawVecInner: Sync,
impl Unpin for WaveformSummary
impl UnsafeUnpin for WaveformSummarywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<WaveformLevel>: UnsafeUnpin,
PhantomData<Vec<Accumulator>>: UnsafeUnpin,
impl UnwindSafe for WaveformSummarywhere
RawVecInner: UnwindSafe,
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