[][src]Struct sample::interpolate::Sinc

pub struct Sinc<S> { /* fields omitted */ }

Interpolator for sinc interpolation.

Generally accepted as one of the better sample rate converters, although it uses significantly more computation.

Implementations

impl<S> Sinc<S>[src]

pub fn new(frames: Fixed<S>) -> Self where
    S: SliceMut,
    S::Element: Frame
[src]

Create a new Sinc interpolator with the given ring buffer.

The given ring buffer should have a length twice that of the desired sinc interpolation depth.

The initial contents of the ring_buffer will act as padding for the interpolated signal.

**panic!**s if the given ring buffer's length is not a multiple of 2.

Trait Implementations

impl<S> Interpolator for Sinc<S> where
    S: SliceMut,
    S::Element: Frame,
    <S::Element as Frame>::Sample: Duplex<f64>, 
[src]

type Frame = S::Element

fn interpolate(&self, x: f64) -> Self::Frame[src]

Sinc interpolation

Auto Trait Implementations

impl<S> RefUnwindSafe for Sinc<S> where
    S: RefUnwindSafe

impl<S> Send for Sinc<S> where
    S: Send

impl<S> Sync for Sinc<S> where
    S: Sync

impl<S> Unpin for Sinc<S> where
    S: Unpin

impl<S> UnwindSafe for Sinc<S> where
    S: UnwindSafe

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<S, T> Duplex<S> for T where
    T: FromSample<S> + ToSample<S>, 
[src]

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

impl<S> FromSample<S> for S[src]

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

impl<T, U> ToSample<U> for T where
    U: FromSample<T>, 
[src]

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.