summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-08-09 15:39:27 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-08-09 15:44:35 -0700
commitd6393fee69c97a66ab11e841274494a72ae8c272 (patch)
tree9f3d46fd32f0473bb102310b0fccd5e91a8becc0 /src
parent26781613bc12a88d9ce75beba04e26ae5aac1350 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/modules/mixer/mixer.c10
1 files changed, 5 insertions, 5 deletions
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
};
© All Rights Reserved