[][src]Struct loopers_engine::sample::Sample

pub struct Sample {
    pub buffer: [Vec<f32>; 2],
}

Fields

buffer: [Vec<f32>; 2]

Implementations

impl Sample[src]

pub fn new() -> Sample[src]

pub fn with_size(len: usize) -> Sample[src]

pub fn from_mono(buffer: &[f32]) -> Sample[src]

pub fn length(&self) -> u64[src]

pub fn record(&mut self, data: &[&[f32]])[src]

pub fn overdub(&mut self, time_in_samples: u64, data: &[&[f32]])[src]

pub fn replace(&mut self, time_in_samples: u64, data: &[&[f32]])[src]

pub fn clear(&mut self)[src]

pub fn xfade(
    &mut self,
    xfade_size: usize,
    start_time_in_fade: u64,
    time_in_samples: u64,
    data: &[&[f32]],
    direction: XfadeDirection,
    f: fn(_: f32) -> f32
)
[src]

Performs a crossfade with the existing buffer using the given function The fade direction refers to the given sample -- i.e., a fade in starts with 100% of the existing sample, and ends at 100% of the new sample.

Trait Implementations

impl Clone for Sample[src]

Auto Trait Implementations

impl RefUnwindSafe for Sample

impl Send for Sample

impl Sync for Sample

impl Unpin for Sample

impl UnwindSafe for Sample

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.