浏览代码

libobs: Fix for monitoring deduplication edge case

When an 'Audio Capture Source' device is also used for monitoring, the
deduplication logic is applied: all monitored sources are silenced.
But this should not silence the 'Audio Capture Source' if for some
reason, it is being monitored (the user will get echoes, but hey, it's
their choice). So we exclude the 'Audio Capture Source' from the
silenced sources.

Signed-off-by: pkv <[email protected]>
pkv 3 周之前
父节点
当前提交
40dd9f6c5e
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      libobs/obs-audio.c

+ 2 - 1
libobs/obs-audio.c

@@ -544,7 +544,8 @@ static inline bool should_silence_monitored_source(obs_source_t *source, struct
 	bool output_capture_unmuted = !audio->monitoring_duplicating_source->user_muted;
 
 	if (audio->prevent_monitoring_duplication && output_capture_unmuted) {
-		if (source->monitoring_type == OBS_MONITORING_TYPE_MONITOR_AND_OUTPUT) {
+		if (source->monitoring_type == OBS_MONITORING_TYPE_MONITOR_AND_OUTPUT &&
+		    source != audio->monitoring_duplicating_source) {
 			return true;
 		}
 	}