[][src]Struct tdpsola::TdpsolaSynthesis

pub struct TdpsolaSynthesis { /* fields omitted */ }

Struct used to re-synthesize a TdpsolaSynthesis into audio again.

Implementations

impl TdpsolaSynthesis[src]

pub fn new(initial_speed: Speed, wavelength: f32) -> Self[src]

Create a new TdpsolaSynthesis.

initial_speed is the initial speed used to synthesize the audio. wavelength is the wavelength of the synthesized audio.

pub fn set_speed(&mut self, new_speed: Speed)[src]

Set the new speed to be used in reconstruction.

pub fn set_wavelength(&mut self, new_wavelength: f32)[src]

pub fn try_get_sample(
    &self,
    analysis: &TdpsolaAnalysis
) -> Result<f32, SamplingError>
[src]

Get the current re-synthesized sample.

Note

The first few samples (the first n samples where n equals the wavelength, rounded up) are different, preventing "perfect" reconstruction. This can be compensated for by pre-padding the input with n zero samples and discarding the first n samples in the reconstructed data.

pub fn step(&mut self, analysis: &TdpsolaAnalysis)[src]

pub fn iter<'s, 'a>(
    &'s mut self,
    analysis: &'a TdpsolaAnalysis
) -> SynthesisIter<'s, 'a>

Notable traits for SynthesisIter<'s, 'a>

impl<'s, 'a> Iterator for SynthesisIter<'s, 'a> type Item = f32;
[src]

Auto Trait Implementations

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, 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.