From 315087be30678ef536f076166f2018eb4e9b2fc2 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sat, 25 Mar 2023 08:16:20 +1000 Subject: [PATCH] Add MA_THREAD_DEFAULT_STACK_SIZE for threads. --- miniaudio.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/miniaudio.h b/miniaudio.h index ce5d3214..6e4e5566 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -16442,6 +16442,12 @@ static ma_result ma_thread_create(ma_thread* pThread, ma_thread_priority priorit return MA_OUT_OF_MEMORY; } +#if defined(MA_THREAD_DEFAULT_STACK_SIZE) + if (stackSize == 0) { + stackSize = MA_THREAD_DEFAULT_STACK_SIZE; + } +#endif + pProxyData->entryProc = entryProc; pProxyData->pData = pData; ma_allocation_callbacks_init_copy(&pProxyData->allocationCallbacks, pAllocationCallbacks);