From 23274a9d570f3821c20dcc004da5e6e0afa122bd Mon Sep 17 00:00:00 2001 From: Lauri Niskanen Date: Sat, 6 Jul 2024 01:15:16 +0300 Subject: [PATCH] pulseaudio: Consider ignored sinks never running If the current sink happens to be ignored it is never considered running so it will be replaced with another sink. --- src/util/audio_backend.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util/audio_backend.cpp b/src/util/audio_backend.cpp index e634784b..3d90b6d5 100644 --- a/src/util/audio_backend.cpp +++ b/src/util/audio_backend.cpp @@ -144,6 +144,12 @@ void AudioBackend::sinkInfoCb(pa_context * /*context*/, const pa_sink_info *i, i if (!backend->ignored_sinks_.empty()) { for (const auto &ignored_sink : backend->ignored_sinks_) { if (ignored_sink == i->description) { + if (i->name == backend->current_sink_name_) { + // If the current sink happens to be ignored it is never considered running + // so it will be replaced with another sink. + backend->current_sink_running_ = false; + } + return; } }