Convert

Trait Convert 

Source
pub trait Convert {
    // Required method
    fn next_sample<I>(&mut self, iter: &mut I) -> Option<f64>
       where I: Iterator<Item = f64>,
             Self: Sized;

    // Provided method
    fn process<I>(&mut self, iter: I) -> ConvertIter<'_, I, Self> 
       where I: Iterator<Item = f64>,
             Self: Sized { ... }
}

Required Methods§

Source

fn next_sample<I>(&mut self, iter: &mut I) -> Option<f64>
where I: Iterator<Item = f64>, Self: Sized,

Get the next sample converted, return None until the input samples is not enough.

Note that the output can be continued after None returned.

Provided Methods§

Source

fn process<I>(&mut self, iter: I) -> ConvertIter<'_, I, Self>
where I: Iterator<Item = f64>, Self: Sized,

Process samples and return an iterator, can be called multiple times.

Implementors§

Source§

impl Convert for simple_src::linear::Converter

Source§

impl Convert for simple_src::sinc::Converter