Open rajatkriplani opened 6 hours ago
I have made changes. I have got a question! why if-else instead of switch case?
+ gcc -std=c11 libmonotone.c main.c -o libmonotone
libmonotone.c: In function ‘monotone_generate’:
libmonotone.c:180:55: error: ‘M_PI’ undeclared (first use in this function)
180 | track_sample = (size_t)(((sin(2 * M_PI * t / 100) + 1) * 127.5));
| ^~~~
libmonotone.c:180:55: note: each undeclared identifier is reported only once for each function it appears in
I've pushed a commit which fixes the invalid .mon file error. Please make sure it compiles.
libmonotone.h
now has an enum forwaveform_type_t
, memberwaveform_type
in themonotone_s
struct, and a function prototypemonotone_set_waveform_type()
. Still when I run it I get the error: