pub struct Clip { /* private fields */ }Expand description
Mono samples and the rate they were taken at.
Implementations§
Source§impl Clip
impl Clip
pub fn new(sample_rate: u32, samples: Vec<f32>) -> Result<Self, ClipError>
Sourcepub fn canonical(samples: Vec<f32>) -> Self
pub fn canonical(samples: Vec<f32>) -> Self
Labels samples as 16 kHz. It does not resample them.
pub fn sample_rate(&self) -> u32
pub fn samples(&self) -> &[f32]
pub fn into_samples(self) -> Vec<f32>
pub fn duration(&self) -> Duration
pub fn is_canonical(&self) -> bool
pub fn into_canonical(self) -> Result<Self, ResampleError>
Available on non-
target_family=wasm only.Trait Implementations§
impl StructuralPartialEq for Clip
Auto Trait Implementations§
impl Freeze for Clip
impl RefUnwindSafe for Clip
impl Send for Clip
impl Sync for Clip
impl Unpin for Clip
impl UnsafeUnpin for Clip
impl UnwindSafe for Clip
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