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