summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2021-08-05 10:47:45 +0200
committerMax Kellermann <max@musicpd.org>2021-08-05 10:48:17 +0200
commitb838bf31099404fe0ed5e49fabe89cc82a7f929a (patch)
tree96c4661a490cb2738d6d0a1d66b49ad19b2506f7
parent4d1ce7023b8a732817bc074799283963dc787603 (diff)
output/pipewire: un-inline StateChanged()
-rw-r--r--src/output/plugins/PipeWireOutputPlugin.cxx19
1 files 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,
@@ -345,6 +339,17 @@ PipeWireOutput::Close() noexcept
}
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
{
auto *b = pw_stream_dequeue_buffer(stream);