From b1893aa8f1025bcd63a60daff9572404bcdf5202 Mon Sep 17 00:00:00 2001 From: David Reid Date: Thu, 21 Aug 2025 14:33:52 +1000 Subject: [PATCH] Minor C89 compatibility fix. --- examples/engine_sdl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/engine_sdl.c b/examples/engine_sdl.c index 9b07385d..05a8bf76 100644 --- a/examples/engine_sdl.c +++ b/examples/engine_sdl.c @@ -22,10 +22,12 @@ static ma_sound g_sound; /* This example will play only a single soun void data_callback(void* pUserData, ma_uint8* pBuffer, int bufferSizeInBytes) { + ma_uint32 bufferSizeInFrames; + (void)pUserData; /* Reading is just a matter of reading straight from the engine. */ - ma_uint32 bufferSizeInFrames = (ma_uint32)bufferSizeInBytes / ma_get_bytes_per_frame(ma_format_f32, ma_engine_get_channels(&g_engine)); + bufferSizeInFrames = (ma_uint32)bufferSizeInBytes / ma_get_bytes_per_frame(ma_format_f32, ma_engine_get_channels(&g_engine)); ma_engine_read_pcm_frames(&g_engine, pBuffer, bufferSizeInFrames, NULL); }