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 whose finest buckets hold
base_bucket samples, with levels zoom levels in all.
§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 planar samples, one slice per channel, all of one length.
§Errors
Returns WaveformError::MismatchedBlock for a block with 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