Unified · Split
| @@ -8,7 +8,7 @@ WORGLE_FLAGS=-g -Werror · 7 unmodified lines | ||
| 8 | 8 | C89?=$(CC) -std=c89 |
| 9 | 9 | C99?=$(CC) -std=c99 |
| 10 | 10 | |
| 11 | −CFLAGS += -Ipatchwerk | |
| 11 | +CFLAGS += -Ipatchwerk -I. | |
| 12 | 12 | CFLAGS += -Wall |
| 13 | 13 | CFLAGS += -O3 |
| 14 | 14 | |
| @@ -53,6 +53,8 @@ biramp.o \ · 38 unmodified lines | ||
| 53 | 53 | core.o \ |
| 54 | 54 | patchwerk/patchwerk.o |
| 55 | 55 | |
| 56 | +include nodes/config.mk | |
| 57 | + | |
| 56 | 58 | .SUFFIX: .org .c |
| 57 | 59 | |
| 58 | 60 | .SUFFIXES: .org .c |
| @@ -0,0 +1 @@ | ||
| 1 | +gcc ex1.c -L../ -I../ -lsndkit -o ex1 -I../patchwerk -I../nodes | |
| @@ -2,8 +2,8 @@ · 1 unmodified line | ||
| 2 | 2 | #include <stdio.h> |
| 3 | 3 | #include "patchwerk.h" |
| 4 | 4 | #include "core.h" |
| 5 | −#include "nodes/wavout.h" | |
| 6 | −#include "nodes/sine.h" | |
| 5 | +#include "wavout/wavout.h" | |
| 6 | +#include "sine/sine.h" | |
| 7 | 7 | |
| 8 | 8 | int main(int argc, char *argv[]) |
| 9 | 9 | { |
| @@ -11,7 +11,7 @@ int main(int argc, char *argv[]) · 1 unmodified line | ||
| 11 | 11 | unsigned int n; |
| 12 | 12 | unsigned int nblocks; |
| 13 | 13 | |
| 14 | − core = sk_core_new(sr); | |
| 14 | + core = sk_core_new(44100); | |
| 15 | 15 | |
| 16 | 16 | nblocks = sk_core_seconds_to_blocks(core, 10); |
| 17 | 17 | |
| @@ -7,6 +7,10 @@ · 6 unmodified lines | ||
| 7 | 7 | #include "sine.h" |
| 8 | 8 | #include "osc.h" |
| 9 | 9 | |
| 10 | +#ifndef M_PI | |
| 11 | +#define M_PI 3.14159265358979323846 | |
| 12 | +#endif | |
| 13 | + | |
| 10 | 14 | struct sine_n { |
| 11 | 15 | pw_cable *freq; |
| 12 | 16 | pw_cable *amp; |
| @@ -65,7 +65,6 @@ int sk_node_wavout(sk_core *core, const char *filename) · 64 unmodified lines | ||
| 65 | 65 | sk_param in; |
| 66 | 66 | void *ud; |
| 67 | 67 | struct wavout_n *wavout; |
| 68 | − int sr; | |
| 69 | 68 | drwav_data_format format; |
| 70 | 69 | |
| 71 | 70 | rc = sk_param_get(core, &in); |