Fix merging audio with audio device and app audio where one audio device is a microphone with mono input

This commit is contained in:
dec05eba
2025-02-24 19:46:01 +01:00
parent d12f312bc1
commit ec092f20c8
2 changed files with 12 additions and 1 deletions

2
TODO
View File

@@ -178,7 +178,7 @@ Test if `xrandr --output DP-1 --scale 1.5` captures correct size on nvidia.
Fix cursor position and scale when scaling x11 display. Fix cursor position and scale when scaling x11 display.
Support surround audio in application audio recording. Right now only stereo sound is supported. Support surround audio in application audio recording. Right now only stereo and mono sound is supported.
Support application audio recording without pulseaudio combined sink. Support application audio recording without pulseaudio combined sink.

View File

@@ -109,6 +109,17 @@ static void gsr_pipewire_audio_create_link(gsr_pipewire_audio *self, const gsr_p
output_fl_port = gsr_pipewire_audio_get_node_port_by_name(self, output_node->id, "capture_FL"); output_fl_port = gsr_pipewire_audio_get_node_port_by_name(self, output_node->id, "capture_FL");
output_fr_port = gsr_pipewire_audio_get_node_port_by_name(self, output_node->id, "capture_FR"); output_fr_port = gsr_pipewire_audio_get_node_port_by_name(self, output_node->id, "capture_FR");
} }
if(!output_fl_port || !output_fr_port) {
const gsr_pipewire_audio_port *output_mono_port = NULL;
output_mono_port = gsr_pipewire_audio_get_node_port_by_name(self, output_node->id, "monitor_MONO");
if(!output_mono_port)
output_mono_port = gsr_pipewire_audio_get_node_port_by_name(self, output_node->id, "capture_MONO");
if(output_mono_port) {
output_fl_port = output_mono_port;
output_fr_port = output_mono_port;
}
}
break; break;
} }
} }