From d6393fee69c97a66ab11e841274494a72ae8c272 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 9 Aug 2023 15:39:27 -0700 Subject: modules/mixer: %S/fade/blend/g Blend is a more accurate word for what's being done. Fading is something you can achieve with the blend mode, if you use something like "blank" as one of the modules. But when you have two modules generating content, it's not a fade, it's just a blend. It might make sense in the future to support a "fade" which assumes a solid color for one module rather than having to use the "blank" builtin which burns memory bandwidth on a blank frame. --- src/modules/mixer/mixer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules') diff --git a/src/modules/mixer/mixer.c b/src/modules/mixer/mixer.c index d893353..5e1af26 100644 --- a/src/modules/mixer/mixer.c +++ b/src/modules/mixer/mixer.c @@ -17,7 +17,7 @@ /* This implements a rudimentary mixing module for things like fades */ typedef enum mixer_style_t { - MIXER_STYLE_FADE, + MIXER_STYLE_BLEND, MIXER_STYLE_FLICKER, } mixer_style_t; @@ -54,7 +54,7 @@ typedef struct mixer_setup_t { mixer_setup_input_t inputs[2]; } mixer_setup_t; -#define MIXER_DEFAULT_STYLE MIXER_STYLE_FADE +#define MIXER_DEFAULT_STYLE MIXER_STYLE_BLEND static void mixer_update_taps(mixer_context_t *ctxt, til_stream_t *stream, unsigned ticks) @@ -131,7 +131,7 @@ static void mixer_prepare_frame(til_module_context_t *context, til_stream_t *str til_module_render(ctxt->inputs[i].module_ctxt, stream, ticks, &fragment); break; - case MIXER_STYLE_FADE: { + case MIXER_STYLE_BLEND: { float T = ctxt->vars.T; if (T < 1.f) { @@ -201,7 +201,7 @@ static void mixer_render_fragment(til_module_context_t *context, til_stream_t *s /* handled in prepare_frame() */ break; - case MIXER_STYLE_FADE: { + case MIXER_STYLE_BLEND: { uint32_t *dest = fragment->buf; til_fb_fragment_t *snapshot_a, *snapshot_b; uint32_t *a, *b; @@ -322,7 +322,7 @@ static int mixer_setup(const til_settings_t *settings, til_setting_t **res_setti const char *exclusions[] = { "none", "mixer", NULL }; const char *style_values[] = { - "fade", + "blend", "flicker", NULL }; -- cgit v1.2.3