From 5707d0e4477a29e990c90efc2cc41cc186e6fe69 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Tue, 21 Nov 2023 10:28:36 +0100 Subject: Fix latency reporting on OpenSL --- src/cubeb_opensl.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cubeb_opensl.cpp b/src/cubeb_opensl.cpp index 916d7da..8725173 100644 --- a/src/cubeb_opensl.cpp +++ b/src/cubeb_opensl.cpp @@ -1891,8 +1891,10 @@ opensl_stream_get_latency(cubeb_stream * stm, uint32_t * latency) uint32_t stream_latency_frames = stm->user_output_rate * stm->output_latency_ms / 1000; - return static_cast(stream_latency_frames + - cubeb_resampler_latency(stm->resampler)); + *latency = static_cast(stream_latency_frames + + cubeb_resampler_latency(stm->resampler)); + + return CUBEB_OK; } int -- cgit v1.2.3