#define MA_JOB_QUEUE_NON_BLOCKING 0x00000001 /* When set, ma_job_queue_next() will not wait and no semaphore will be signaled in ma_job_queue_post(). ma_job_queue_next() will return MA_NO_DATA_AVAILABLE if nothing is available. */
#define MA_JOB_QUEUE_FLAG_NON_BLOCKING 0x00000001 /* When set, ma_job_queue_next() will not wait and no semaphore will be signaled in ma_job_queue_post(). ma_job_queue_next() will return MA_NO_DATA_AVAILABLE if nothing is available. */
MA_APIma_resultma_job_queue_next(ma_job_queue*pQueue,ma_job*pJob);/* Returns MA_CANCELLED if the next job is a quit job. */
#define MA_RESOURCE_MANAGER_NO_JOB_THREAD 0x00000001 /* Enable this to manage the job thread yourself. */
#define MA_RESOURCE_MANAGER_NON_BLOCKING 0x00000002 /* Indicates ma_resource_manager_next_job() should not block. Only valid with MA_RESOURCE_MANAGER_NO_JOB_THREAD. */
/* Maximum job thread count will be restricted to this, but this may be removed later and replaced with a heap allocation thereby removing any limitation. */
#define MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING 0x00000001 /* Indicates ma_resource_manager_next_job() should not block. Only valid with MA_RESOURCE_MANAGER_NO_JOB_THREAD. */
typedefstruct
{
...
...
@@ -358,6 +362,7 @@ typedef struct
ma_formatdecodedFormat;
ma_uint32decodedChannels;
ma_uint32decodedSampleRate;
ma_uint32jobThreadCount;/* Set to 0 if you want to self-manage your job threads. Defaults to 1. */
ma_uint32flags;
ma_vfs*pVFS;/* Can be NULL in which case defaults will be used. */
/* The job thread need to be killed first. To do this we need to post a quit message to the message queue and then wait for the thread. */
/*
Job threads need to be killed first. To do this we need to post a quit message to the message queue and then wait for the thread. The quit message will never be removed from the
queue which means it will never not be returned after being encounted for the first time which means all threads will eventually receive it.