mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 16:54:03 +02:00
Decouple MA_API and MA_STATIC defines.
This commit is contained in:
+27
-17
@@ -3930,36 +3930,46 @@ typedef ma_uint16 wchar_t;
|
|||||||
#define MA_NO_INLINE
|
#define MA_NO_INLINE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* MA_DLL is not officially supported. You're on your own if you want to use this. */
|
||||||
|
#if defined(MA_DLL)
|
||||||
|
#if defined(_WIN32)
|
||||||
|
#define MA_DLL_IMPORT __declspec(dllimport)
|
||||||
|
#define MA_DLL_EXPORT __declspec(dllexport)
|
||||||
|
#define MA_DLL_PRIVATE static
|
||||||
|
#else
|
||||||
|
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||||
|
#define MA_DLL_IMPORT __attribute__((visibility("default")))
|
||||||
|
#define MA_DLL_EXPORT __attribute__((visibility("default")))
|
||||||
|
#define MA_DLL_PRIVATE __attribute__((visibility("hidden")))
|
||||||
|
#else
|
||||||
|
#define MA_DLL_IMPORT
|
||||||
|
#define MA_DLL_EXPORT
|
||||||
|
#define MA_DLL_PRIVATE static
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(MA_API)
|
#if !defined(MA_API)
|
||||||
#if defined(MA_DLL)
|
#if defined(MA_DLL)
|
||||||
#if defined(_WIN32)
|
|
||||||
#define MA_DLL_IMPORT __declspec(dllimport)
|
|
||||||
#define MA_DLL_EXPORT __declspec(dllexport)
|
|
||||||
#define MA_DLL_PRIVATE static
|
|
||||||
#else
|
|
||||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
|
||||||
#define MA_DLL_IMPORT __attribute__((visibility("default")))
|
|
||||||
#define MA_DLL_EXPORT __attribute__((visibility("default")))
|
|
||||||
#define MA_DLL_PRIVATE __attribute__((visibility("hidden")))
|
|
||||||
#else
|
|
||||||
#define MA_DLL_IMPORT
|
|
||||||
#define MA_DLL_EXPORT
|
|
||||||
#define MA_DLL_PRIVATE static
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(MINIAUDIO_IMPLEMENTATION) || defined(MA_IMPLEMENTATION)
|
#if defined(MINIAUDIO_IMPLEMENTATION) || defined(MA_IMPLEMENTATION)
|
||||||
#define MA_API MA_DLL_EXPORT
|
#define MA_API MA_DLL_EXPORT
|
||||||
#else
|
#else
|
||||||
#define MA_API MA_DLL_IMPORT
|
#define MA_API MA_DLL_IMPORT
|
||||||
#endif
|
#endif
|
||||||
#define MA_PRIVATE MA_DLL_PRIVATE
|
|
||||||
#else
|
#else
|
||||||
#define MA_API extern
|
#define MA_API extern
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MA_STATIC)
|
||||||
|
#if defined(MA_DLL)
|
||||||
|
#define MA_PRIVATE MA_DLL_PRIVATE
|
||||||
|
#else
|
||||||
#define MA_PRIVATE static
|
#define MA_PRIVATE static
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* SIMD alignment in bytes. Currently set to 32 bytes in preparation for future AVX optimizations. */
|
/* SIMD alignment in bytes. Currently set to 32 bytes in preparation for future AVX optimizations. */
|
||||||
#define MA_SIMD_ALIGNMENT 32
|
#define MA_SIMD_ALIGNMENT 32
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user