summaryrefslogtreecommitdiff
path: root/src/til.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-11-18 16:11:34 -0800
committerVito Caputo <vcaputo@pengaru.com>2023-11-18 16:11:34 -0800
commitcc15fd679c9d3c94bdcfe970bc7d3c03bc8994ef (patch)
treeccb4eaf5d8700ac1a5c8df2e31b86a3a0a6f1afa /src/til.c
parent9f7209dae9b45a26e501559fbefbb9037cada890 (diff)
til_builtins/pre: introduce "pre" pre-render hook module
This adds a new "meta" module which registers itself as a pre-render context on the stream, to render whatever module is specified as the "module=" setting. The impetus for this is background music in rkt creations, so one can avoid enduring the rigamarole of plugging something like a "playit" instance into every scene. With this "pre" builtin one can just use something like "pre,module=playit,itfile=music.it" as a scene, and that will get the playit module playing music.it hooked into the stream, without the need to always have it present in every scene's settings. There's a TODO item noting the need for taps to control the active/inactive state of the pre instance this adds. For now, once you have a "pre", whatever module it contains will be rendered before the main stream context set w/til_stream_set_module_context() gets rendered. That's fine for now, but there will need to be more control especially as more complex productions happen involving multiple songs.
Diffstat (limited to 'src/til.c')
-rw-r--r--src/til.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/til.c b/src/til.c
index e7de53d..a74ff86 100644
--- a/src/til.c
+++ b/src/til.c
@@ -65,6 +65,7 @@ extern til_module_t asc_module;
extern til_module_t _blank_module;
extern til_module_t _none_module;
extern til_module_t _noop_module;
+extern til_module_t _pre_module;
extern til_module_t _ref_module;
static const til_module_t *modules[] = {
@@ -105,6 +106,7 @@ static const til_module_t *modules[] = {
&_blank_module,
&_none_module,
&_noop_module,
+ &_pre_module,
&_ref_module,
};
© All Rights Reserved