From b838bf31099404fe0ed5e49fabe89cc82a7f929a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 5 Aug 2021 10:47:45 +0200 Subject: [PATCH] output/pipewire: un-inline StateChanged() --- 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 09823edb4..957bcbaf9 100644 --- a/src/output/plugins/PipeWireOutputPlugin.cxx +++ b/src/output/plugins/PipeWireOutputPlugin.cxx @@ -87,13 +87,7 @@ private: } void StateChanged(enum pw_stream_state state, - [[maybe_unused]] const char *error) noexcept { - const bool was_disconnected = disconnected; - disconnected = state == PW_STREAM_STATE_ERROR || - state == PW_STREAM_STATE_UNCONNECTED; - if (!was_disconnected && disconnected) - pw_thread_loop_signal(thread_loop, false); - } + const char *error) noexcept; static void StateChanged(void *data, [[maybe_unused]] enum pw_stream_state old, @@ -344,6 +338,17 @@ PipeWireOutput::Close() noexcept delete ring_buffer; } +inline void +PipeWireOutput::StateChanged(enum pw_stream_state state, + [[maybe_unused]] const char *error) noexcept +{ + const bool was_disconnected = disconnected; + disconnected = state == PW_STREAM_STATE_ERROR || + state == PW_STREAM_STATE_UNCONNECTED; + if (!was_disconnected && disconnected) + pw_thread_loop_signal(thread_loop, false); +} + inline void PipeWireOutput::Process() noexcept {