[][src]Struct tdpsola::TdpsolaSynthesis

pub struct TdpsolaSynthesis { /* fields omitted */ }

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


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(
    analysis: &TdpsolaAnalysis
) -> Result<f32, SamplingError>

Get the current re-synthesized sample.


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;

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.