From d26b5d94677a7091d95972cbfd4337fb36a5e622 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 22 Nov 2018 14:32:48 -0800 Subject: Use proper time types for the device clock time and latency --- Alc/backends/opensl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Alc/backends/opensl.cpp') diff --git a/Alc/backends/opensl.cpp b/Alc/backends/opensl.cpp index 2c516021..f7ad1595 100644 --- a/Alc/backends/opensl.cpp +++ b/Alc/backends/opensl.cpp @@ -654,8 +654,8 @@ static ClockLatency ALCopenslPlayback_getClockLatency(ALCopenslPlayback *self) ALCopenslPlayback_lock(self); ret.ClockTime = GetDeviceClockTime(device); - ret.Latency = ll_ringbuffer_read_space(self->mRing)*device->UpdateSize * - DEVICE_CLOCK_RES / device->Frequency; + ret.Latency = std::chrono::seconds{ll_ringbuffer_read_space(self->mRing)*device->UpdateSize}; + ret.Latency /= device->Frequency; ALCopenslPlayback_unlock(self); return ret; -- cgit v1.2.3