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.
This commit is contained in:
Lauri Niskanen 2024-07-06 01:15:16 +03:00
parent 6f994c849d
commit 23274a9d57
No known key found for this signature in database
GPG Key ID: 807DCEAC3AEB1848
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}
}