From 1adad94ef863a7eb714a5753d5c1222bfb1238ac Mon Sep 17 00:00:00 2001 From: David Reid Date: Mon, 12 Jan 2026 19:51:40 +1000 Subject: [PATCH] Try fixing the Emscripten build. --- extras/vfs/debugging/miniaudio_vfs_debugging.c | 10 +++++++--- tests/engine/engine.cpp | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/extras/vfs/debugging/miniaudio_vfs_debugging.c b/extras/vfs/debugging/miniaudio_vfs_debugging.c index a447f833..72c6fce3 100644 --- a/extras/vfs/debugging/miniaudio_vfs_debugging.c +++ b/extras/vfs/debugging/miniaudio_vfs_debugging.c @@ -46,10 +46,14 @@ static ma_result ma_vfs_debugging_read(ma_vfs* pVFS, ma_vfs_file file, void* pDs ma_vfs_debugging* pDebuggingVFS = ma_vfs_debugging_cast(pVFS); ma_result result; - /* Introduce artificial latency if requested. */ - if (pDebuggingVFS->config.latencyInMilliseconds > 0) { - ma_sleep(pDebuggingVFS->config.latencyInMilliseconds); + /* Introduce artificial latency if requested. Ignored on Emscripten. */ + #ifndef __EMSCRIPTEN__ + { + if (pDebuggingVFS->config.latencyInMilliseconds > 0) { + ma_sleep(pDebuggingVFS->config.latencyInMilliseconds); + } } + #endif /*printf("READING\n");*/ diff --git a/tests/engine/engine.cpp b/tests/engine/engine.cpp index 9123bfce..304b0a59 100644 --- a/tests/engine/engine.cpp +++ b/tests/engine/engine.cpp @@ -112,7 +112,11 @@ int main(int argc, char** argv) } } - ma_sleep(20000); + #ifndef __EMSCRIPTEN__ + { + ma_sleep(20000); + } + #endif for (size_t i = 0; i < sounds.size(); i += 1) { ma_sound_uninit(sounds[i]);