소스 검색

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;
 		}
 	}