diff options
author | XANTRONIX Development | 2022-01-31 13:03:45 -0500 |
---|---|---|
committer | XANTRONIX Development | 2022-01-31 13:03:45 -0500 |
commit | 300f39e19369d44d3217bf1122d1feeaef4a0f5d (patch) | |
tree | 20beb967288817c26d976c8cbe462847aa63b859 /include/xas | |
parent | d8e3d3fc0fb6e4f88f3e3c789575e38a74a01299 (diff) | |
download | xas-300f39e19369d44d3217bf1122d1feeaef4a0f5d.tar.gz xas-300f39e19369d44d3217bf1122d1feeaef4a0f5d.tar.bz2 xas-300f39e19369d44d3217bf1122d1feeaef4a0f5d.zip |
I really don't like the fact that this compiles
Diffstat (limited to 'include/xas')
-rw-r--r-- | include/xas/synth.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/xas/synth.h b/include/xas/synth.h index 4d0fbd0..014d330 100644 --- a/include/xas/synth.h +++ b/include/xas/synth.h @@ -2,6 +2,9 @@ #define _XAS_SYNTH_H #include <stdint.h> +#include <sys/types.h> + +#include <xas/audio.h> typedef struct _xas_synth xas_synth; @@ -10,15 +13,24 @@ typedef int16_t (*xas_synth_callback_sample)(xas_synth *synth, void *ctx); typedef void (*xas_synth_callback_destroy)(xas_synth *synth, void *ctx); struct _xas_synth { + size_t sample_rate; + xas_synth_callback_sample sample; xas_synth_callback_destroy destroy; void *ctx; }; -xas_synth *xas_synth_new(xas_synth_callback_sample sample, +xas_synth *xas_synth_new(size_t sample_rate, + xas_synth_callback_sample sample, xas_synth_callback_destroy destroy, void *ctx); void xas_synth_destroy(xas_synth *synth); +int16_t xas_synth_sample(xas_synth *synth); + +ssize_t xas_synth_fill(xas_synth *synth, + int16_t *samples, + size_t count); + #endif /* _XAS_SYNTH_H */ |