Commit 928ed8bd authored by David Reid's avatar David Reid

Web Audio: Enable threading in ma_engine if compiling with -pthread.

With this commit, when targeting pthreads with the -pthread, the engine
will allow threading with it's internal resource manager.

Public issue https://github.com/mackron/miniaudio/issues/855
parent ae2cd4be
......@@ -75690,8 +75690,8 @@ MA_API ma_result ma_engine_init(const ma_engine_config* pConfig, ma_engine* pEng
ma_allocation_callbacks_init_copy(&resourceManagerConfig.allocationCallbacks, &pEngine->allocationCallbacks);
resourceManagerConfig.pVFS = engineConfig.pResourceManagerVFS;
/* The Emscripten build cannot use threads. */
#if defined(MA_EMSCRIPTEN)
/* The Emscripten build cannot use threads unless it's targeting pthreads. */
#if defined(MA_EMSCRIPTEN) && !defined(__EMSCRIPTEN_PTHREADS__)
{
resourceManagerConfig.jobThreadCount = 0;
resourceManagerConfig.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment