init
This commit is contained in:
parent
5fbddbbc26
commit
614fa6cdc8
12 changed files with 345 additions and 8 deletions
17
osc.h
Normal file
17
osc.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef OSC_H
|
||||
#define OSC_H
|
||||
|
||||
#include <stdatomic.h>
|
||||
|
||||
typedef struct osc {
|
||||
const float *wavetable;
|
||||
float phase; // in [0.0, 1.0)
|
||||
float inc;
|
||||
_Atomic float inc_target;
|
||||
} osc;
|
||||
|
||||
float osc_process(osc *o);
|
||||
|
||||
void osc_create(osc *o, float freq, float sample_rate, float *wavetable);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue