diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-11-13 23:31:33 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-11-14 01:20:56 -0800 |
commit | 461b6bc98ad6a64ffefe8beedf736caef823cc25 (patch) | |
tree | fb80255d3e9d3eee592bc72df425609d2ca52d48 /src/til.h | |
parent | 4c629d77d9bd67e9861f578d89957b3cf1472aa8 (diff) |
til: introduce til_module_t.render_audio entrypoint
Simple audio rendering modules need a way to render their audio
without affecting the fragment's state. By providing a
til_module_t.render_audio() a module indicates it's only an audio
renderer, and its render won't trigger an implicit clear of the
frame's fragment.
There might be a new flag added to indicate when modules are
audio modules, but this is good enough for now.
Diffstat (limited to 'src/til.h')
-rw-r--r-- | src/til.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -30,6 +30,7 @@ typedef struct til_stream_t til_stream_t; struct til_module_t { til_module_context_t * (*create_context)(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup); void (*destroy_context)(til_module_context_t *context); /* destroy gets stream in context, but the render-related functions should always use the passed-in stream so it can potentially change */ + void (*render_audio)(til_module_context_t *context, til_stream_t *stream, unsigned ticks); void (*prepare_frame)(til_module_context_t *context, til_stream_t *stream, unsigned ticks, til_fb_fragment_t **fragment_ptr, til_frame_plan_t *res_frame_plan); void (*render_fragment)(til_module_context_t *context, til_stream_t *stream, unsigned ticks, unsigned cpu, til_fb_fragment_t **fragment_ptr); int (*finish_frame)(til_module_context_t *context, til_stream_t *stream, unsigned ticks, til_fb_fragment_t **fragment_ptr); |