MultiDelay

Struct MultiDelay 

Source
pub struct MultiDelay<T: Float, I> { /* private fields */ }
Expand description

A multi-channel delay-line with its own buffer

Implementations§

Source§

impl<T: Float, I: InterpolatorTrait<T>> MultiDelay<T, I>

Source

pub fn new(interpolator: I, channels: usize, capacity: usize) -> Self

Create a new multi-channel delay line

Source

pub fn reset(&mut self, value: T)

Reset the delay line to a specific value

Source

pub fn resize(&mut self, channels: usize, capacity: usize, value: T)

Resize the delay line

Source

pub fn read_channel(&self, channel: usize, delay_samples: T) -> T

Read a sample from a specific channel

Source

pub fn read(&self, delay_samples: T, output: &mut [T])

Read samples from all channels with the same delay

Source

pub fn read_multi(&self, delays: &[T], output: &mut [T])

Read samples from all channels with different delays

Source

pub fn write(&mut self, data: &[T]) -> &mut Self

Write samples to all channels

Auto Trait Implementations§

§

impl<T, I> Freeze for MultiDelay<T, I>
where I: Freeze,

§

impl<T, I> RefUnwindSafe for MultiDelay<T, I>

§

impl<T, I> Send for MultiDelay<T, I>
where I: Send, T: Send,

§

impl<T, I> Sync for MultiDelay<T, I>
where I: Sync, T: Sync,

§

impl<T, I> Unpin for MultiDelay<T, I>
where I: Unpin, T: Unpin,

§

impl<T, I> UnwindSafe for MultiDelay<T, I>
where I: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.