diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-12-09 18:26:39 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-12-09 18:26:39 -0800 |
commit | d4070d282976488016320ef0e2a9de3b62b8dd6d (patch) | |
tree | 40f571979f284e4d973bc9884b233a610a62932d /src/modules/mixer | |
parent | 28dc1deaa67f6a2380b17431e6a2ef06a445c1ee (diff) |
modules/mixer: implement bottom={a,b} setting
This makes the setting actually transpose a_module<->b_module for
style={interlace,paintroller,sine}. The default is for a_module
to be the logical bottom (bottom=a).
Diffstat (limited to 'src/modules/mixer')
-rw-r--r-- | src/modules/mixer/mixer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/mixer/mixer.c b/src/modules/mixer/mixer.c index ccd17a4..299d630 100644 --- a/src/modules/mixer/mixer.c +++ b/src/modules/mixer/mixer.c @@ -144,6 +144,7 @@ static inline float randf(unsigned *seed) static void mixer_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) { mixer_context_t *ctxt = (mixer_context_t *)context; + mixer_setup_t *setup = (mixer_setup_t *)context->setup; til_fb_fragment_t *fragment = *fragment_ptr; size_t i = 0; @@ -176,14 +177,14 @@ static void mixer_prepare_frame(til_module_context_t *context, til_stream_t *str */ if (T > .001f) { - til_module_render(ctxt->inputs[1].module_ctxt, stream, ticks, &fragment); + til_module_render(ctxt->inputs[setup->bottom == MIXER_BOTTOM_A ? 1 : 0].module_ctxt, stream, ticks, &fragment); if (T < .999f) ctxt->snapshots[1] = til_fb_fragment_snapshot(&fragment, 0); } if (T < .999f) - til_module_render(ctxt->inputs[0].module_ctxt, stream, ticks, &fragment); + til_module_render(ctxt->inputs[setup->bottom == MIXER_BOTTOM_A ? 0 : 1].module_ctxt, stream, ticks, &fragment); break; } |