dasp_signal

Trait Step

Source
pub trait Step {
    // Required method
    fn step(&mut self) -> f64;
}
Expand description

Types that may be used to give a phase step size based on some hz / sample rate.

This allows the Phase to be generic over either ConstHz and Hz<I>.

Generally, users need not be concerned with this trait unless writing code that must remain generic over phase stepping types like oscillators.

Required Methods§

Source

fn step(&mut self) -> f64

Yield the phase step size (normally hz / sampling rate).

The Phase calls this and uses the returned value to step forward its internal phase.

Implementors§

Source§

impl Step for ConstHz

Source§

impl<S> Step for Hz<S>
where S: Signal<Frame = f64>,