diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-02-24 19:46:01 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-02-24 19:46:01 +0100 |
commit | ec092f20c887e9eea1d985d6d0aba9c504ef1849 (patch) | |
tree | 940886506895579a50d0e45a3000cde1c062d0e8 | |
parent | d12f312bc13874b9adf076103cf5f1325a0b1249 (diff) |
Fix merging audio with audio device and app audio where one audio device is a microphone with mono input
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | src/pipewire_audio.c | 11 |
2 files changed, 12 insertions, 1 deletions
@@ -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. -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. diff --git a/src/pipewire_audio.c b/src/pipewire_audio.c index 00cd4b4..54f29bc 100644 --- a/src/pipewire_audio.c +++ b/src/pipewire_audio.c @@ -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_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; } } |