From 89875c2bef6983949fdce448d759a313c794bdff Mon Sep 17 00:00:00 2001 From: David Reid Date: Thu, 20 Oct 2022 11:09:18 +1000 Subject: [PATCH] Fix the VC6 build. --- miniaudio.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index 771dfea7..374024ac 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -55673,7 +55673,8 @@ MA_API ma_result ma_data_source_get_cursor_in_seconds(ma_data_source* pDataSourc return result; } - *pCursor = cursorInPCMFrames / (float)sampleRate; + /* VC6 does not support division of unsigned 64-bit integers with floating point numbers. Need to use a signed number. This shouldn't effect anything in practice. */ + *pCursor = (ma_int64)cursorInPCMFrames / (float)sampleRate; return MA_SUCCESS; } @@ -55700,7 +55701,8 @@ MA_API ma_result ma_data_source_get_length_in_seconds(ma_data_source* pDataSourc return result; } - *pLength = lengthInPCMFrames / (float)sampleRate; + /* VC6 does not support division of unsigned 64-bit integers with floating point numbers. Need to use a signed number. This shouldn't effect anything in practice. */ + *pLength = (ma_int64)lengthInPCMFrames / (float)sampleRate; return MA_SUCCESS; }