Skip to content

Commit

Permalink
pulseaudio: Consider ignored sinks never running
Browse files Browse the repository at this point in the history
If the current sink happens to be ignored it is never considered running
so it will be replaced with another sink.
  • Loading branch information
Ape committed Jul 5, 2024
1 parent 6f994c8 commit 23274a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/util/audio_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 23274a9

Please sign in to comment.