From 15b67f20e5a62a998f714fefab4bc1e693e4296a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 21 Oct 2021 18:06:53 +0200 Subject: [PATCH] output/pipewire: un-inline ParamChanged() --- src/output/plugins/PipeWireOutputPlugin.cxx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) 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 {