From 300f39e19369d44d3217bf1122d1feeaef4a0f5d Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Mon, 31 Jan 2022 13:03:45 -0500 Subject: I really don't like the fact that this compiles --- include/xas/synth.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'include/xas') 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 +#include + +#include 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 */ -- cgit v1.2.3