pub fn new_with_sample_rate(sample_rate: f32, generator_fn: fn(T) -> T) -> Self {
        let frequency = 440.;
        let phase_step = get_phase_step(sample_rate, frequency);
        Oscillator {
            sample_rate,
            generator_fn,
            frequency,
            phase: 0.,
            phase_step,
        }
    }
/// Construct a new oscillator with a given sample rate
Construct a new oscillator with a given sample rate
Construct a new oscillator with a given sample rate
pub fn new_with_sample_rate(sample_rate: f32, generator_fn: fn(T) -> T) -> Self {
        let frequency = 440.;
        let phase_step = get_phase_step(sample_rate, frequency);
        Oscillator {
            sample_rate,
            generator_fn,
            frequency,
            phase: 0.,
            phase_step,
        }
    }
pub fn new_with_sample_rate ( sample_rate : f32 , generator_fn : fn ( T ) -> T ) -> Self { let frequency = 440. ; let phase_step = get_phase_step ( sample_rate , frequency ) ; Oscillator { sample_rate , generator_fn , frequency , phase : 0. , phase_step , } }
Construct a new oscillator with a given sample rate
Construct a new oscillator with a given sample rate
sample_rate
f32
generator_fn
fn(T) -> T
sample_rate
f32
generator_fn
fn(T) -> T