diff --git a/NEWS b/NEWS index c9f55947e..cb25c1a0e 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ ver 0.23.8 (not yet released) - pipewire: fix crash with PipeWire 0.3.53 * mixer - better error messages + - alsa: fix setting volume before playback starts * support libfmt 9 ver 0.23.7 (2022/05/09) diff --git a/src/mixer/MixerAll.cxx b/src/mixer/MixerAll.cxx index 96830e7cc..302a06160 100644 --- a/src/mixer/MixerAll.cxx +++ b/src/mixer/MixerAll.cxx @@ -91,7 +91,10 @@ output_mixer_set_volume(AudioOutputControl &ao, unsigned volume) /* software mixers are always updated, even if they are disabled */ - if (!ao.IsReallyEnabled() && !mixer->IsPlugin(software_mixer_plugin)) + if (!mixer->IsPlugin(software_mixer_plugin) && + /* "global" mixers can be used even if the output hasn't + been used yet */ + !(mixer->IsGlobal() ? ao.IsEnabled() : ao.IsReallyEnabled())) return SetVolumeResult::DISABLED; try { diff --git a/src/mixer/MixerInternal.hxx b/src/mixer/MixerInternal.hxx index 9fc92d2bd..68b89df4f 100644 --- a/src/mixer/MixerInternal.hxx +++ b/src/mixer/MixerInternal.hxx @@ -63,6 +63,10 @@ public: return &plugin == &other; } + bool IsGlobal() const noexcept { + return plugin.global; + } + /** * Open mixer device *