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.
This commit is contained in:
Arsen Arsenović 2022-03-09 15:05:21 +01:00 committed by Max Kellermann
parent 33a84a8ca2
commit c7a4355153
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -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

View File

@ -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)