From c7a4355153a5a308047807d9a4c6bf56ad239c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= Date: Wed, 9 Mar 2022 15:05:21 +0100 Subject: [PATCH] outputs/pipewire: fix ParamChanged incorrectly setting volume Previous versions of MPD would, on parameter change, set the PipeWire volume before clearing the restore_volume flag, causing the call to short circuit and do nothing. Instead, clear the flag before the call. --- NEWS | 1 + src/output/plugins/PipeWireOutputPlugin.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 4572e675b..f28c274f7 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ ver 0.23.7 (not yet released) * output - shout: require at least libshout 2.4.0 * mixer + - pipewire: fix volume restore - software: update volume of disabled outputs * support libiconv diff --git a/src/output/plugins/PipeWireOutputPlugin.cxx b/src/output/plugins/PipeWireOutputPlugin.cxx index bf5155a5b..18821b105 100644 --- a/src/output/plugins/PipeWireOutputPlugin.cxx +++ b/src/output/plugins/PipeWireOutputPlugin.cxx @@ -638,8 +638,8 @@ PipeWireOutput::ParamChanged([[maybe_unused]] uint32_t id, [[maybe_unused]] const struct spa_pod *param) noexcept { if (restore_volume) { - SetVolume(volume); restore_volume = false; + SetVolume(volume); } #if defined(ENABLE_DSD) && defined(SPA_AUDIO_DSD_FLAG_NONE)