From 6a280b4d4555000071356e754afe1b686a5bb434 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Mon, 31 Jan 2022 10:52:14 -0500 Subject: Initial commit of include/xas/synth.h --- include/xas/synth.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/xas/synth.h (limited to 'include/xas') diff --git a/include/xas/synth.h b/include/xas/synth.h new file mode 100644 index 0000000..4d0fbd0 --- /dev/null +++ b/include/xas/synth.h @@ -0,0 +1,24 @@ +#ifndef _XAS_SYNTH_H +#define _XAS_SYNTH_H + +#include + +typedef struct _xas_synth xas_synth; + +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 { + xas_synth_callback_sample sample; + xas_synth_callback_destroy destroy; + void *ctx; +}; + +xas_synth *xas_synth_new(xas_synth_callback_sample sample, + xas_synth_callback_destroy destroy, + void *ctx); + +void xas_synth_destroy(xas_synth *synth); + +#endif /* _XAS_SYNTH_H */ -- cgit v1.2.3