Struct sample::interpolate::Sinc
[−]
[src]
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.
Methods
impl<S> Sinc<S>
[src]
fn new(frames: Fixed<S>) -> Self where
S: SliceMut,
S::Element: Frame,
[src]
S: SliceMut,
S::Element: Frame,
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]
S: SliceMut,
S::Element: Frame,
<S::Element as Frame>::Sample: Duplex<f64>,
type Frame = S::Element
fn interpolate(&self, x: f64) -> Self::Frame
[src]
Sinc interpolation
fn next_source_frame(&mut self, source_frame: Self::Frame)
[src]
Called whenever the Interpolator value steps passed 1.0.