From 902556b143342b8e03474fc62ab363c41c6d30a3 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 3 Mar 2025 13:17:35 +0100 Subject: Pulseaudio audio device capture: dont change default output when switching default output --- TODO | 5 ++++- src/sound.cpp | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index b295291..a82f00e 100644 --- a/TODO +++ b/TODO @@ -241,4 +241,7 @@ Support reconnecting (and setting things up again) if the audio server is restar Find out how nvidia-smi fixes nvenc not working on opensuse and do that ourselves instead of relying on nvidia-smi that is not always installed. -Pulseaudio code: add "running" variable to loops to allow stopping the running code when quitting. \ No newline at end of file +Pulseaudio code: add "running" variable to loops to allow stopping the running code when quitting. + +The implementation of changing audio device to capture from when using default_output/default_input and the default device is changed in system audio settings + has been disabled because of bugs in pipewire (and kde plasma?). Enable this when it's fixed. \ No newline at end of file diff --git a/src/sound.cpp b/src/sound.cpp index aaf8ef5..b0924f7 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -234,10 +234,11 @@ static pa_handle* pa_sound_device_new(const char *server, if(!startup_get_default_devices(p, device_name)) goto fail; - pa_context_set_subscribe_callback(p->context, subscribe_cb, p); - pa = pa_context_subscribe(p->context, PA_SUBSCRIPTION_MASK_SERVER, NULL, NULL); - if(pa) - pa_operation_unref(pa); + // TODO: This has to be disabled because of bugs in pipewire (and kde plasma?) + //pa_context_set_subscribe_callback(p->context, subscribe_cb, p); + //pa = pa_context_subscribe(p->context, PA_SUBSCRIPTION_MASK_SERVER, NULL, NULL); + //if(pa) + // pa_operation_unref(pa); return p; -- cgit v1.2.3-70-g09d2