Function sampara::signal::phase_step[][src]

pub fn phase_step<F, const N: usize>(delta: F) -> Phase<Fixed<F, N>, N> where
    F: Frame<N, Sample = f64>, 

Creates a Phase with a constant Frame of deltas.

This Phase does not terminate, it will always return a step value.

use sampara::{signal, Signal};

fn main() {
    let mut phase = signal::phase_step([0.125, 0.25, 0.375]);

    assert_eq!(phase.next(), Some([0.125, 0.25, 0.375]));
    assert_eq!(phase.next(), Some([0.25, 0.5, 0.75]));
    assert_eq!(phase.next(), Some([0.375, 0.75, 0.125]));
}