Merge pull request #3416 from Ape/pr/ignored_sink_never_running

pulseaudio: Consider ignored sinks never running
This commit is contained in:
Alexis Rouillard 2024-07-16 14:20:32 +02:00 committed by GitHub
commit 3f61df4e66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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;
}
}