mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 08:44:04 +02:00
Minor reorganization.
This commit is contained in:
+23
-20
@@ -3954,26 +3954,6 @@ typedef ma_uint16 wchar_t;
|
|||||||
#if !defined(MA_WIN32) && !defined(MA_DOS) /* If it's not Win32, assume POSIX. */
|
#if !defined(MA_WIN32) && !defined(MA_DOS) /* If it's not Win32, assume POSIX. */
|
||||||
#define MA_POSIX
|
#define MA_POSIX
|
||||||
|
|
||||||
#if !defined(MA_NO_THREADING)
|
|
||||||
/*
|
|
||||||
Use the MA_NO_PTHREAD_IN_HEADER option at your own risk. This is intentionally undocumented.
|
|
||||||
You can use this to avoid including pthread.h in the header section. The downside is that it
|
|
||||||
results in some fixed sized structures being declared for the various types that are used in
|
|
||||||
miniaudio. The risk here is that these types might be too small for a given platform. This
|
|
||||||
risk is yours to take and no support will be offered if you enable this option.
|
|
||||||
*/
|
|
||||||
#ifndef MA_NO_PTHREAD_IN_HEADER
|
|
||||||
#include <pthread.h> /* Unfortunate #include, but needed for pthread_t, pthread_mutex_t and pthread_cond_t types. */
|
|
||||||
typedef pthread_t ma_pthread_t;
|
|
||||||
typedef pthread_mutex_t ma_pthread_mutex_t;
|
|
||||||
typedef pthread_cond_t ma_pthread_cond_t;
|
|
||||||
#else
|
|
||||||
typedef ma_uintptr ma_pthread_t;
|
|
||||||
typedef union ma_pthread_mutex_t { char __data[40]; ma_uint64 __alignment; } ma_pthread_mutex_t;
|
|
||||||
typedef union ma_pthread_cond_t { char __data[48]; ma_uint64 __alignment; } ma_pthread_cond_t;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__unix__)
|
#if defined(__unix__)
|
||||||
#define MA_UNIX
|
#define MA_UNIX
|
||||||
#endif
|
#endif
|
||||||
@@ -4123,6 +4103,29 @@ typedef ma_uint16 ma_wchar_win32;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(MA_POSIX)
|
||||||
|
#if !defined(MA_NO_THREADING)
|
||||||
|
/*
|
||||||
|
Use the MA_NO_PTHREAD_IN_HEADER option at your own risk. This is intentionally undocumented.
|
||||||
|
You can use this to avoid including pthread.h in the header section. The downside is that it
|
||||||
|
results in some fixed sized structures being declared for the various types that are used in
|
||||||
|
miniaudio. The risk here is that these types might be too small for a given platform. This
|
||||||
|
risk is yours to take and no support will be offered if you enable this option.
|
||||||
|
*/
|
||||||
|
#ifndef MA_NO_PTHREAD_IN_HEADER
|
||||||
|
#include <pthread.h> /* Unfortunate #include, but needed for pthread_t, pthread_mutex_t and pthread_cond_t types. */
|
||||||
|
typedef pthread_t ma_pthread_t;
|
||||||
|
typedef pthread_mutex_t ma_pthread_mutex_t;
|
||||||
|
typedef pthread_cond_t ma_pthread_cond_t;
|
||||||
|
#else
|
||||||
|
typedef ma_uintptr ma_pthread_t;
|
||||||
|
typedef union ma_pthread_mutex_t { char __data[40]; ma_uint64 __alignment; } ma_pthread_mutex_t;
|
||||||
|
typedef union ma_pthread_cond_t { char __data[48]; ma_uint64 __alignment; } ma_pthread_cond_t;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static MA_INLINE ma_bool32 ma_is_little_endian(void)
|
static MA_INLINE ma_bool32 ma_is_little_endian(void)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user