diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-08-28 18:57:55 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-11-14 01:20:48 -0800 |
commit | b22df31feeb7e695faabecfd7cc6fdd24609b0e1 (patch) | |
tree | b1c33983aec45ba17de58276d2c3696695e573dd /src/til_audio_context.h | |
parent | 8245857f9f07043039affd7b92a740e002b1b81b (diff) |
til: add preliminary audio backend
This is an early implementation of something resembling an audio
backend for rototiller/libtil.
The assumption for now is that everything will use signed 16-bit
native-endian stereo output @ 44.1khz.
Diffstat (limited to 'src/til_audio_context.h')
-rw-r--r-- | src/til_audio_context.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/til_audio_context.h b/src/til_audio_context.h new file mode 100644 index 0000000..8efdbac --- /dev/null +++ b/src/til_audio_context.h @@ -0,0 +1,21 @@ +#ifndef _TIL_AUDIO_CONTEXT_H +#define _TIL_AUDIO_CONTEXT_H + +/* XXX: this isn't intended to be used outside of til_audio.[ch] */ + +#include <stddef.h> + +typedef struct til_setup_t til_setup_t; +typedef struct til_audio_ops_t til_audio_ops_t; + +typedef struct til_audio_context_t { + til_setup_t *setup; + const til_audio_ops_t *ops; + const til_audio_hooks_t *hooks; + void *hooks_context; +} til_audio_context_t; + +void * til_audio_context_new(const til_audio_ops_t *ops, size_t size, til_setup_t *setup); +til_audio_context_t * til_audio_context_free(til_audio_context_t *audio_context); + +#endif |