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