mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Fix build with MA_NO_DEVICE_IO.
Public issue https://github.com/dr-soft/miniaudio/issues/171
This commit is contained in:
+52
-51
@@ -2007,6 +2007,58 @@ typedef struct
|
|||||||
} ma_lcg;
|
} ma_lcg;
|
||||||
|
|
||||||
|
|
||||||
|
/* Thread priorties should be ordered such that the default priority of the worker thread is 0. */
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
ma_thread_priority_idle = -5,
|
||||||
|
ma_thread_priority_lowest = -4,
|
||||||
|
ma_thread_priority_low = -3,
|
||||||
|
ma_thread_priority_normal = -2,
|
||||||
|
ma_thread_priority_high = -1,
|
||||||
|
ma_thread_priority_highest = 0,
|
||||||
|
ma_thread_priority_realtime = 1,
|
||||||
|
ma_thread_priority_default = 0
|
||||||
|
} ma_thread_priority;
|
||||||
|
|
||||||
|
#if defined(MA_WIN32)
|
||||||
|
typedef ma_handle ma_thread;
|
||||||
|
#endif
|
||||||
|
#if defined(MA_POSIX)
|
||||||
|
typedef pthread_t ma_thread;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(MA_WIN32)
|
||||||
|
typedef ma_handle ma_mutex;
|
||||||
|
#endif
|
||||||
|
#if defined(MA_POSIX)
|
||||||
|
typedef pthread_mutex_t ma_mutex;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(MA_WIN32)
|
||||||
|
typedef ma_handle ma_event;
|
||||||
|
#endif
|
||||||
|
#if defined(MA_POSIX)
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
ma_uint32 value;
|
||||||
|
pthread_mutex_t lock;
|
||||||
|
pthread_cond_t cond;
|
||||||
|
} ma_event;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(MA_WIN32)
|
||||||
|
typedef ma_handle ma_semaphore;
|
||||||
|
#endif
|
||||||
|
#if defined(MA_POSIX)
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int value;
|
||||||
|
pthread_mutex_t lock;
|
||||||
|
pthread_cond_t cond;
|
||||||
|
} ma_semaphore;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Retrieves the version of miniaudio as separated integers. Each component can be NULL if it's not required.
|
Retrieves the version of miniaudio as separated integers. Each component can be NULL if it's not required.
|
||||||
*/
|
*/
|
||||||
@@ -2997,57 +3049,6 @@ typedef enum
|
|||||||
ma_backend_null /* <-- Must always be the last item. Lowest priority, and used as the terminator for backend enumeration. */
|
ma_backend_null /* <-- Must always be the last item. Lowest priority, and used as the terminator for backend enumeration. */
|
||||||
} ma_backend;
|
} ma_backend;
|
||||||
|
|
||||||
/* Thread priorties should be ordered such that the default priority of the worker thread is 0. */
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
ma_thread_priority_idle = -5,
|
|
||||||
ma_thread_priority_lowest = -4,
|
|
||||||
ma_thread_priority_low = -3,
|
|
||||||
ma_thread_priority_normal = -2,
|
|
||||||
ma_thread_priority_high = -1,
|
|
||||||
ma_thread_priority_highest = 0,
|
|
||||||
ma_thread_priority_realtime = 1,
|
|
||||||
ma_thread_priority_default = 0
|
|
||||||
} ma_thread_priority;
|
|
||||||
|
|
||||||
#if defined(MA_WIN32)
|
|
||||||
typedef ma_handle ma_thread;
|
|
||||||
#endif
|
|
||||||
#if defined(MA_POSIX)
|
|
||||||
typedef pthread_t ma_thread;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(MA_WIN32)
|
|
||||||
typedef ma_handle ma_mutex;
|
|
||||||
#endif
|
|
||||||
#if defined(MA_POSIX)
|
|
||||||
typedef pthread_mutex_t ma_mutex;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(MA_WIN32)
|
|
||||||
typedef ma_handle ma_event;
|
|
||||||
#endif
|
|
||||||
#if defined(MA_POSIX)
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
ma_uint32 value;
|
|
||||||
pthread_mutex_t lock;
|
|
||||||
pthread_cond_t cond;
|
|
||||||
} ma_event;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(MA_WIN32)
|
|
||||||
typedef ma_handle ma_semaphore;
|
|
||||||
#endif
|
|
||||||
#if defined(MA_POSIX)
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
int value;
|
|
||||||
pthread_mutex_t lock;
|
|
||||||
pthread_cond_t cond;
|
|
||||||
} ma_semaphore;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The callback for processing audio data from the device.
|
The callback for processing audio data from the device.
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ find a copy of this text in extras/speex_resampler/README.md in the miniaudio re
|
|||||||
#include "../../extras/speex_resampler/ma_speex_resampler.h"
|
#include "../../extras/speex_resampler/ma_speex_resampler.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define MA_NO_DEVICE_IO
|
||||||
#define MINIAUDIO_IMPLEMENTATION
|
#define MINIAUDIO_IMPLEMENTATION
|
||||||
#include "../../miniaudio.h"
|
#include "../../miniaudio.h"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user