mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 09:14:04 +02:00
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
This commit is contained in:
+2
-2
@@ -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);
|
ma_allocation_callbacks_init_copy(&resourceManagerConfig.allocationCallbacks, &pEngine->allocationCallbacks);
|
||||||
resourceManagerConfig.pVFS = engineConfig.pResourceManagerVFS;
|
resourceManagerConfig.pVFS = engineConfig.pResourceManagerVFS;
|
||||||
|
|
||||||
/* The Emscripten build cannot use threads. */
|
/* The Emscripten build cannot use threads unless it's targeting pthreads. */
|
||||||
#if defined(MA_EMSCRIPTEN)
|
#if defined(MA_EMSCRIPTEN) && !defined(__EMSCRIPTEN_PTHREADS__)
|
||||||
{
|
{
|
||||||
resourceManagerConfig.jobThreadCount = 0;
|
resourceManagerConfig.jobThreadCount = 0;
|
||||||
resourceManagerConfig.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING;
|
resourceManagerConfig.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING;
|
||||||
|
|||||||
Reference in New Issue
Block a user