Skip to content

Commit 7952cd4

Browse files
authored
add audio processing to new transition (#574)
1 parent be56105 commit 7952cd4

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

plugins/obs-transitions/transition-shuffle.c

+13-1
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,26 @@ void shuffle_video_render(void *data, gs_effect_t *effect)
9393
UNUSED_PARAMETER(effect);
9494
}
9595

96+
static float mix_a(void *data, float t)
97+
{
98+
UNUSED_PARAMETER(data);
99+
return 1.0f - cubic_ease_in_out(t);
100+
}
101+
102+
static float mix_b(void *data, float t)
103+
{
104+
UNUSED_PARAMETER(data);
105+
return cubic_ease_in_out(t);
106+
}
107+
96108
static bool shuffle_audio_render(void *data, uint64_t *ts_out,
97109
struct obs_source_audio_mix *audio,
98110
uint32_t mixers, size_t channels,
99111
size_t sample_rate)
100112
{
101113
struct shuffle_info *pm = data;
102114
return obs_transition_audio_render(pm->source, ts_out, audio, mixers,
103-
channels, sample_rate, NULL, NULL);
115+
channels, sample_rate, mix_a, mix_b);
104116
}
105117

106118
static enum gs_color_space

0 commit comments

Comments
 (0)