diff --git a/src/output/plugins/PipeWireOutputPlugin.cxx b/src/output/plugins/PipeWireOutputPlugin.cxx index d13a1c23f..6b9940d42 100644 --- a/src/output/plugins/PipeWireOutputPlugin.cxx +++ b/src/output/plugins/PipeWireOutputPlugin.cxx @@ -216,12 +216,7 @@ private: o.ControlInfo(control); } - void ParamChanged() noexcept { - if (restore_volume) { - SetVolume(volume); - restore_volume = false; - } - } + void ParamChanged(uint32_t id, const struct spa_pod *param) noexcept; static void ParamChanged(void *data, uint32_t id, @@ -231,7 +226,7 @@ private: return; auto &o = *(PipeWireOutput *)data; - o.ParamChanged(); + o.ParamChanged(id, param); } /* virtual methods from class AudioOutput */ @@ -571,6 +566,16 @@ PipeWireOutput::StateChanged(enum pw_stream_state state, } +inline void +PipeWireOutput::ParamChanged([[maybe_unused]] uint32_t id, + [[maybe_unused]] const struct spa_pod *param) noexcept +{ + if (restore_volume) { + SetVolume(volume); + restore_volume = false; + } +} + inline void PipeWireOutput::Process() noexcept {