/* Thread priorities should be ordered such that the default priority of the worker thread is 0. */
/* Thread priorities should be ordered such that the default priority of the worker thread is 0. */
typedef enum
typedef enum
{
{
ma_thread_priority_idle = -5,
ma_thread_priority_idle = -5,
ma_thread_priority_lowest = -4,
ma_thread_priority_lowest = -4,
ma_thread_priority_low = -3,
ma_thread_priority_low = -3,
ma_thread_priority_normal = -2,
ma_thread_priority_normal = -2,
ma_thread_priority_high = -1,
ma_thread_priority_high = -1,
ma_thread_priority_highest = 0,
ma_thread_priority_highest = 0,
ma_thread_priority_realtime = 1,
ma_thread_priority_realtime = 1,
ma_thread_priority_default = 0
ma_thread_priority_default = 0
} ma_thread_priority;
} ma_thread_priority;
#if defined(MA_WIN32)
#if defined(MA_POSIX)
typedef ma_handle ma_thread;
typedef ma_pthread_t ma_thread;
#endif
#elif defined(MA_WIN32)
#if defined(MA_POSIX)
typedef ma_handle ma_thread;
typedef ma_pthread_t ma_thread;
#endif
#endif
#if defined(MA_WIN32)
#if defined(MA_POSIX)
typedef ma_handle ma_mutex;
typedef ma_pthread_mutex_t ma_mutex;
#endif
#elif defined(MA_WIN32)
#if defined(MA_POSIX)
typedef ma_handle ma_mutex;
typedef ma_pthread_mutex_t ma_mutex;
#endif
#endif
#if defined(MA_WIN32)
#if defined(MA_POSIX)
typedef ma_handle ma_event;
typedef struct
#endif
{
#if defined(MA_POSIX)
ma_uint32 value;
typedef struct
ma_pthread_mutex_t lock;
{
ma_pthread_cond_t cond;
ma_uint32 value;
} ma_event;
ma_pthread_mutex_t lock;
#elif defined(MA_WIN32)
ma_pthread_cond_t cond;
typedef ma_handle ma_event;
} ma_event;
#endif
#endif /* MA_POSIX */
#if defined(MA_WIN32)
#if defined(MA_POSIX)
typedef ma_handle ma_semaphore;
typedef struct
#endif
{
#if defined(MA_POSIX)
int value;
typedef struct
ma_pthread_mutex_t lock;
{
ma_pthread_cond_t cond;
int value;
} ma_semaphore;
ma_pthread_mutex_t lock;
#elif defined(MA_WIN32)
ma_pthread_cond_t cond;
typedef ma_handle ma_semaphore;
} ma_semaphore;
#endif
#endif /* MA_POSIX */
#else
#else
/* MA_NO_THREADING is set which means threading is disabled. Threading is required by some API families. If any of these are enabled we need to throw an error. */
/* MA_NO_THREADING is set which means threading is disabled. Threading is required by some API families. If any of these are enabled we need to throw an error. */
#ifndef MA_NO_DEVICE_IO
#ifndef MA_NO_DEVICE_IO
#error "MA_NO_THREADING cannot be used without MA_NO_DEVICE_IO";
#error "MA_NO_THREADING cannot be used without MA_NO_DEVICE_IO";
#endif
#endif
#endif /* MA_NO_THREADING */
#endif /* MA_NO_THREADING */
...
@@ -6278,12 +6275,12 @@ This section contains the APIs for device playback and capture. Here is where yo
...
@@ -6278,12 +6275,12 @@ This section contains the APIs for device playback and capture. Here is where yo