Просмотр исходного кода

libobs: Trigger monitoring deduplication when fader is at minimum

When the 'Audio Output Capture' source (usually Desktop Audio) has its
fader at minimum, we should disable the deduplication logic.
This is done by checking against the obs_source volume member.

Signed-off-by: pkv <[email protected]>
pkv 2 месяцев назад
Родитель
Сommit
189ed7c386
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      libobs/obs-audio.c

+ 2 - 1
libobs/obs-audio.c

@@ -553,7 +553,8 @@ static inline bool should_silence_monitored_source(obs_source_t *source, struct
 	if (!audio->monitoring_duplicating_source)
 		return false;
 
-	bool output_capture_unmuted = !audio->monitoring_duplicating_source->user_muted;
+	bool fader_muted = close_float(audio->monitoring_duplicating_source->volume, 0.0f, 0.0001f);
+	bool output_capture_unmuted = !audio->monitoring_duplicating_source->user_muted && !fader_muted;
 
 	if (audio->prevent_monitoring_duplication && output_capture_unmuted) {
 		if (source->monitoring_type == OBS_MONITORING_TYPE_MONITOR_AND_OUTPUT &&