From e720faf2d40e9e4ec27479ffbbcba1a3b3838956 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 22 Feb 2017 15:00:41 -0800 Subject: [PATCH] Fix OpenSL latency calculation --- Alc/backends/opensl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Alc/backends/opensl.c b/Alc/backends/opensl.c index a667dc70..b8d6d29a 100644 --- a/Alc/backends/opensl.c +++ b/Alc/backends/opensl.c @@ -694,8 +694,8 @@ static ClockLatency ALCopenslPlayback_getClockLatency(ALCopenslPlayback *self) ALCopenslPlayback_lock(self); ret.ClockTime = GetDeviceClockTime(device); - ret.Latency = ll_ringbuffer_read_space(self->mRing) * DEVICE_CLOCK_RES / - device->Frequency; + ret.Latency = ll_ringbuffer_read_space(self->mRing)*device->UpdateSize * + DEVICE_CLOCK_RES / device->Frequency; ALCopenslPlayback_unlock(self); return ret; -- 2.11.4.GIT