From 48210d41a6c65516d45854f934178afa86cab5c4 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 27 Dec 2014 21:11:56 -0800 Subject: [PATCH] libobs: Do not set presentation volume on children When the presentation volume is set for a source, it's set for all of its children and their children. The original intention for doing this was to be able to use it for transitioning, but honestly it's just bad design, and I feel there are better ways to handle transitioning volume. --- libobs/obs-source.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/libobs/obs-source.c b/libobs/obs-source.c index cd8dc2a1a..a8f42cf35 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -1858,16 +1858,8 @@ static void set_tree_preset_vol(obs_source_t *parent, obs_source_t *child, void obs_source_set_present_volume(obs_source_t *source, float volume) { - if (source) { + if (source) source->present_volume = volume; - - /* don't set the presentation volume of the tree if a - * transition source, let the transition handle presentation - * volume for the child sources itself. */ - if (source->info.type != OBS_SOURCE_TYPE_TRANSITION) - obs_source_enum_tree(source, set_tree_preset_vol, - &volume); - } } float obs_source_get_volume(const obs_source_t *source)