浏览代码

win-wasapi: Mark audio outputs as unmonitorable

(Note: This commit also modifies mac-capture and linux-pulseaudio)

This prevents outputs from being monitored, preventing a potential
feedback loop.
jp9000 8 年之前
父节点
当前提交
39d76cc76f
共有 3 个文件被更改,包括 6 次插入3 次删除
  1. 2 1
      plugins/linux-pulseaudio/pulse-input.c
  2. 2 1
      plugins/mac-capture/mac-audio.c
  3. 2 1
      plugins/win-wasapi/win-wasapi.cpp

+ 2 - 1
plugins/linux-pulseaudio/pulse-input.c

@@ -537,7 +537,8 @@ struct obs_source_info pulse_output_capture = {
 	.id             = "pulse_output_capture",
 	.type           = OBS_SOURCE_TYPE_INPUT,
 	.output_flags   = OBS_SOURCE_AUDIO |
-	                  OBS_SOURCE_DO_NOT_DUPLICATE,
+	                  OBS_SOURCE_DO_NOT_DUPLICATE |
+	                  OBS_SOURCE_DO_NOT_MONITOR,
 	.get_name       = pulse_output_getname,
 	.create         = pulse_create,
 	.destroy        = pulse_destroy,

+ 2 - 1
plugins/mac-capture/mac-audio.c

@@ -797,7 +797,8 @@ struct obs_source_info coreaudio_output_capture_info = {
 	.id             = "coreaudio_output_capture",
 	.type           = OBS_SOURCE_TYPE_INPUT,
 	.output_flags   = OBS_SOURCE_AUDIO |
-	                  OBS_SOURCE_DO_NOT_DUPLICATE,
+	                  OBS_SOURCE_DO_NOT_DUPLICATE |
+	                  OBS_SOURCE_DO_NOT_MONITOR,
 	.get_name       = coreaudio_output_getname,
 	.create         = coreaudio_create_output_capture,
 	.destroy        = coreaudio_destroy,

+ 2 - 1
plugins/win-wasapi/win-wasapi.cpp

@@ -589,7 +589,8 @@ void RegisterWASAPIOutput()
 	info.id              = "wasapi_output_capture";
 	info.type            = OBS_SOURCE_TYPE_INPUT;
 	info.output_flags    = OBS_SOURCE_AUDIO |
-	                       OBS_SOURCE_DO_NOT_DUPLICATE;
+	                       OBS_SOURCE_DO_NOT_DUPLICATE |
+	                       OBS_SOURCE_DO_NOT_MONITOR;
 	info.get_name        = GetWASAPIOutputName;
 	info.create          = CreateWASAPIOutput;
 	info.destroy         = DestroyWASAPISource;