oscillators: fix
This commit is contained in:
parent
b06759de76
commit
12b32acb2b
@ -52,6 +52,10 @@ struct sqrtwave {
|
|||||||
} v;
|
} v;
|
||||||
} init_sqrtwave(float frequency, float phase, float amplitude) {
|
} init_sqrtwave(float frequency, float phase, float amplitude) {
|
||||||
struct sqrtwave r;
|
struct sqrtwave r;
|
||||||
|
union {
|
||||||
|
float f;
|
||||||
|
uint32_t u;
|
||||||
|
} v, a;
|
||||||
r.w = init_sinewave(frequency, phase, 1.f);
|
r.w = init_sinewave(frequency, phase, 1.f);
|
||||||
v.f = r.w.s;
|
v.f = r.w.s;
|
||||||
a.f = amplitude;
|
a.f = amplitude;
|
||||||
|
Loading…
Reference in New Issue
Block a user