pub struct Buffer {
pub rate: u32,
pub start: i64,
pub planes: Vec<Vec<f64>>,
}Fields§
§rate: u32§start: i64The grid sample the first of these stands at; sample 0 is t = 0.
planes: Vec<Vec<f64>>Implementations§
Source§impl Buffer
impl Buffer
pub fn silence(rate: u32, width: usize, len: usize) -> Buffer
pub fn empty(rate: u32, width: usize, capacity: usize, start: i64) -> Buffer
pub fn mono(rate: u32, samples: Vec<f64>) -> Buffer
pub fn of_planes(rate: u32, planes: Vec<Vec<f64>>) -> Buffer
pub fn width(&self) -> usize
pub fn plane(&self, c: usize) -> &[f64]
pub fn plane_mut(&mut self, c: usize) -> &mut [f64]
pub fn slices(&self) -> Vec<&[f64]>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn at(&self, c: usize, i: usize) -> f64
pub fn origin_secs(&self) -> f64
pub fn end(&self) -> i64
pub fn extent(&self) -> Extent
pub fn capacity(&self) -> usize
pub fn push(&mut self, c: usize, value: f64)
pub fn forget_before(&mut self, from: i64)
Sourcepub fn within(&self, support: Extent) -> SampleView<'_>
pub fn within(&self, support: Extent) -> SampleView<'_>
A node zero outside support.
Sourcepub fn over(&self, over: Extent, support: Extent) -> Buffer
pub fn over(&self, over: Extent, support: Extent) -> Buffer
These samples over over, a node that is zero outside support.
pub fn plane_slice(&self, c: usize, range: Range<usize>) -> Cow<'_, [f64]>
Trait Implementations§
impl StructuralPartialEq for Buffer
Auto Trait Implementations§
impl Freeze for Buffer
impl RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnsafeUnpin for Buffer
impl UnwindSafe for Buffer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more