mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
@@ -5244,9 +5244,14 @@ ma_result ma_semaphore_init__posix(ma_context* pContext, int initialValue, ma_se
|
|||||||
{
|
{
|
||||||
(void)pContext;
|
(void)pContext;
|
||||||
|
|
||||||
|
#if defined(MA_APPLE)
|
||||||
|
/* Not yet implemented for Apple platforms since sem_init() is deprecated. Need to use a named semaphore via sem_open() instead. */
|
||||||
|
return MA_INVALID_OPERATION;
|
||||||
|
#else
|
||||||
if (sem_init(&pSemaphore->posix.semaphore, 0, (unsigned int)initialValue) == 0) {
|
if (sem_init(&pSemaphore->posix.semaphore, 0, (unsigned int)initialValue) == 0) {
|
||||||
return MA_FAILED_TO_CREATE_SEMAPHORE;
|
return MA_FAILED_TO_CREATE_SEMAPHORE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user