From cdd3d39ac01b490e34f755ac9f4ce1fc2da0e88f Mon Sep 17 00:00:00 2001 From: David Reid Date: Tue, 13 Jan 2026 12:53:30 +1000 Subject: [PATCH] Emscripten: Force MA_NO_THREADING if not compiling with pthread support. --- miniaudio.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/miniaudio.h b/miniaudio.h index 7cad1642..229d5144 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -4102,7 +4102,14 @@ typedef wchar_t ma_wchar_win32; typedef ma_uint16 ma_wchar_win32; #endif +/* Disable threading on the Emscripten build if it's not built with pthread support. */ +#if defined(MA_EMSCRIPTEN) && !defined(__EMSCRIPTEN_PTHREADS__) + #ifndef MA_NO_THREADING + #define MA_NO_THREADING + #endif +#endif +/* pthread. */ #if defined(MA_POSIX) #if !defined(MA_NO_THREADING) /*