pulseaudio: show correct sink volume on default output changes

on sinkInfo callbacks, the default sink now has highest priority.
That fixes an issue that the volume indicator is not updated when
the changes the default output to another devices.

added PA_SINK_IDLE as valid state. PA_SINK_RUNNING is only true
if any sound output is happening on sink switch. Indicator should
also update when no sound is being played.
This commit is contained in:
Philipp Hentschel
2024-07-22 12:17:21 +02:00
parent 21af48fdc9
commit dedee8cd14
3 changed files with 34 additions and 3 deletions

View File

@ -38,6 +38,8 @@ class AudioBackend {
std::string desc_;
std::string monitor_;
std::string current_sink_name_;
std::string default_sink_name;
bool default_sink_running_;
bool current_sink_running_;
// SOURCE
uint32_t source_idx_{0};