提交 48210d41 编写于 作者: J jp9000

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.
上级 fb6f8721
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册