diff --git a/NEWS b/NEWS index ca04f464d..cbea44148 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ ver 0.23.7 (not yet released) * decoder - opus: fix missing song length on high-latency files +* mixer + - software: update volume of disabled outputs ver 0.23.6 (2022/03/14) * protocol diff --git a/src/mixer/MixerAll.cxx b/src/mixer/MixerAll.cxx index f5e066706..da96f93f3 100644 --- a/src/mixer/MixerAll.cxx +++ b/src/mixer/MixerAll.cxx @@ -34,13 +34,15 @@ gcc_pure static int output_mixer_get_volume(const AudioOutputControl &ao) noexcept { - if (!ao.IsEnabled()) - return -1; - auto *mixer = ao.GetMixer(); if (mixer == nullptr) return -1; + /* software mixers are always considered, even if they are + disabled */ + if (!ao.IsEnabled() && !mixer->IsPlugin(software_mixer_plugin)) + return -1; + try { return mixer_get_volume(mixer); } catch (...) { @@ -76,13 +78,15 @@ output_mixer_set_volume(AudioOutputControl &ao, unsigned volume) noexcept { assert(volume <= 100); - if (!ao.IsEnabled()) - return false; - auto *mixer = ao.GetMixer(); if (mixer == nullptr) return false; + /* software mixers are always updated, even if they are + disabled */ + if (!ao.IsEnabled() && !mixer->IsPlugin(software_mixer_plugin)) + return false; + try { mixer_set_volume(mixer, volume); return true;