Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented Oscillator node example to exercise different oscillator types #163

Merged
merged 7 commits into from Nov 9, 2018

ready for pull request

  • Loading branch information
arvindmohan9683 committed Nov 8, 2018
commit 90891d715a0e2307d4dbfd9007aa545b7b49c123
@@ -6,22 +6,9 @@ use param::{Param, ParamType};

#[derive(Copy, Clone, Debug)]
pub struct PeriodicWaveOptions {
// https://webaudio.github.io/web-audio-api/#dictdef-periodicwaveoptions
//pub real: [f32; 2],
//pub imag: [f32; 2],
// XXX https://webaudio.github.io/web-audio-api/#dictdef-periodicwaveoptions
}

/*
impl Default for PeriodicWaveOptions {
fn default() -> Self {
PeriodicWaveOptions {
real: [0.,0.],
imag: [0.,1.],
}
}
}
*/

#[derive(Copy, Clone, Debug)]
pub enum OscillatorType {
Sine,
@@ -169,7 +156,7 @@ impl AudioNodeEngine for OscillatorNode {

}
}

frame.mutate_with(|sample, _| *sample = value);

self.phase += step;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.