From 4c629d77d9bd67e9861f578d89957b3cf1472aa8 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sun, 5 Nov 2023 15:31:59 -0800 Subject: til_stream: add til_audio_context_t to til_stream_t Preliminary means of making the audio context available to modules. --- src/til_stream.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/til_stream.h') diff --git a/src/til_stream.h b/src/til_stream.h index e7b92e6..d72b139 100644 --- a/src/til_stream.h +++ b/src/til_stream.h @@ -24,6 +24,7 @@ #include "til_module_context.h" #include "til_setup.h" +typedef struct til_audio_context_t til_audio_context_t; typedef struct til_stream_t til_stream_t; typedef struct til_stream_module_context_t til_stream_module_context_t; typedef struct til_stream_pipe_t til_stream_pipe_t; @@ -44,13 +45,14 @@ typedef struct til_stream_hooks_t { void (*pipe_dtor)(void *context, til_stream_t *stream, const void *owner, const void *owner_foo, const char *parent_path, const til_tap_t *tap); /* called immediately *after* pipe "destroyed" (withdrawn from stream) */ } til_stream_hooks_t; -til_stream_t * til_stream_new(void); +til_stream_t * til_stream_new(til_audio_context_t *audio_context); til_stream_t * til_stream_free(til_stream_t *stream); void til_stream_end(til_stream_t *stream); int til_stream_active(til_stream_t *stream); void til_stream_start_frame(til_stream_t *stream); int til_stream_set_hooks(til_stream_t *stream, const til_stream_hooks_t *hooks, void *context); int til_stream_unset_hooks(til_stream_t *stream, const til_stream_hooks_t *hooks); +til_audio_context_t * til_stream_get_audio_context(til_stream_t *stream); /* bare interface for non-module-context owned taps */ int til_stream_tap(til_stream_t *stream, const void *owner, const void *owner_foo, const char *parent_path, uint32_t parent_hash, const til_tap_t *tap); -- cgit v1.2.1