From 132d0e3c4256122b3f3c7235d3e6445309caa92d Mon Sep 17 00:00:00 2001 From: Netboy3 <1472804+netboy3@users.noreply.github.com> Date: Sat, 9 Apr 2022 10:10:40 -0400 Subject: [PATCH] [client] audio/pw: pw_stream_get_time() deprecated pw_stream_get_time() is deprecated in PipeWire 0.3.50. Use pw_stream_get_time_n() instead based on PipeWire library version. --- client/audiodevs/PipeWire/pipewire.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/audiodevs/PipeWire/pipewire.c b/client/audiodevs/PipeWire/pipewire.c index 900439ae..d3e93fcd 100644 --- a/client/audiodevs/PipeWire/pipewire.c +++ b/client/audiodevs/PipeWire/pipewire.c @@ -368,7 +368,11 @@ static size_t pipewire_playbackLatency(void) struct pw_time time = { 0 }; pw_thread_loop_lock(pw.thread); +#if PW_CHECK_VERSION(0, 3, 50) + if (pw_stream_get_time_n(pw.playback.stream, &time, sizeof(time)) < 0) +#else if (pw_stream_get_time(pw.playback.stream, &time) < 0) +#endif DEBUG_ERROR("pw_stream_get_time failed"); pw_thread_loop_unlock(pw.thread);