From 496ccdfceef2c1d18757c2f3ae5dc786c2de7209 Mon Sep 17 00:00:00 2001 From: David Reid Date: Thu, 15 Nov 2018 20:11:48 +1000 Subject: [PATCH] Fix a timing bug with the null backend. --- mini_al.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mini_al.h b/mini_al.h index 9f32bb92..cb59616e 100644 --- a/mini_al.h +++ b/mini_al.h @@ -4864,7 +4864,7 @@ mal_bool32 mal_device__get_current_frame__null(mal_device* pDevice, mal_uint32* mal_assert(pCurrentPos != NULL); *pCurrentPos = 0; - mal_uint64 currentFrameAbs = (mal_uint64)(mal_timer_get_time_in_seconds(&pDevice->null_device.timer) * pDevice->sampleRate) / pDevice->channels; + mal_uint64 currentFrameAbs = (mal_uint64)(mal_timer_get_time_in_seconds(&pDevice->null_device.timer) * pDevice->sampleRate); *pCurrentPos = (mal_uint32)(currentFrameAbs % pDevice->bufferSizeInFrames); return MAL_TRUE;