clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit 5f498e6150cf43b4e9e0db5ae3a9149493567ed0
parent 5404af8fcd0a224c103cf9437391cabc3cbc8928
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date:   Sun, 30 Nov 2014 17:57:05 +0100

osc type -> osc waveform

Diffstat:
Mexamples/thyns/osc.h | 26+++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/examples/thyns/osc.h b/examples/thyns/osc.h @@ -3,7 +3,7 @@ # include "defs.h" -enum thyns_osc_type +enum thyns_osc_waveform { THYNS_OSC_NONE = 0, THYNS_OSC_SQUARE = 1, @@ -17,8 +17,8 @@ struct thyns_osc uint32_t sr; // sample rate double pi_sr; // M_PI / sample_rate - enum thyns_osc_type type; - double pwm; // 0..1 + enum thyns_osc_waveform waveform; + double pwm; // 0..1 double tune; double freq; @@ -28,16 +28,16 @@ struct thyns_osc }; static inline void - thyns_osc_init(struct thyns_osc *osc, uint32_t sr) +thyns_osc_init(struct thyns_osc *osc, uint32_t sr) { - osc->sr = sr; - osc->pi_sr = M_PI / ((float)sr); - osc->type = THYNS_OSC_SQUARE; - osc->pwm = 0.5; - osc->freq = 0; - osc->angle = 0; - osc->phase = 0; - osc->tune = 0; + osc->sr = sr; + osc->pi_sr = M_PI / ((float)sr); + osc->waveform = THYNS_OSC_SQUARE; + osc->pwm = 0.5; + osc->freq = 0; + osc->angle = 0; + osc->phase = 0; + osc->tune = 0; } static inline void @@ -53,7 +53,7 @@ thyns_osc_step(struct thyns_osc *osc) osc->angle = fmod(osc->angle + osc->angle_ramp, 2 * M_PI); double angle = fmod(osc->angle + osc->phase, 2 * M_PI); - switch (osc->type) { + switch (osc->waveform) { case THYNS_OSC_NONE: return 0;