pub struct Sample { /* private fields */ }Implementations§
Source§impl Sample
impl Sample
pub const MAX_LENGTH: usize = 16_000_000usize
pub const MAX_RATE: usize = 192_000usize
Sourcepub const PAD_SIZE_EACH: usize = 4usize
pub const PAD_SIZE_EACH: usize = 4usize
this many frames need to be put on the start and the end to ensure that the interpolation algorithms work correctly.
pub fn is_mono(&self) -> bool
Sourcepub fn len_with_pad(&self) -> usize
pub fn len_with_pad(&self) -> usize
len in Frames
pub fn index(&self, idx: usize) -> Frame
pub fn new_stereo_interpolated<I: IntoIterator<Item = f32>>(data: I) -> Self
pub fn new_stereo_interpolated_padded<I: IntoIterator<Item = f32>>( data: I, ) -> Self
pub fn new_mono<I: IntoIterator<Item = f32>>(data: I) -> Self
pub fn new_mono_padded<I: IntoIterator<Item = f32>>(data: I) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sample
impl RefUnwindSafe for Sample
impl Send for Sample
impl Sync for Sample
impl Unpin for Sample
impl UnwindSafe for Sample
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