From f8c63d9ce0702ff1d4c9f244e3903634f0be7669 Mon Sep 17 00:00:00 2001 From: David Reid Date: Fri, 22 May 2020 18:57:51 +1000 Subject: [PATCH] Fix MA_NO_RUNTIME_LINKING for ALSA. --- miniaudio.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/miniaudio.h b/miniaudio.h index 3d5eef59..519b29c8 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -16267,7 +16267,22 @@ ALSA Backend #ifdef MA_HAS_ALSA #ifdef MA_NO_RUNTIME_LINKING + +/* asoundlib.h marks some functions with "inline" which isn't always supported. Need to emulate it. */ +#if !defined(__cplusplus) + #if defined(__STRICT_ANSI__) + #if !defined(inline) + #define inline __inline__ __attribute__((always_inline)) + #define MA_INLINE_DEFINED + #endif + #endif +#endif #include +#if defined(MA_INLINE_DEFINED) + #undef inline + #undef MA_INLINE_DEFINED +#endif + typedef snd_pcm_uframes_t ma_snd_pcm_uframes_t; typedef snd_pcm_sframes_t ma_snd_pcm_sframes_t; typedef snd_pcm_stream_t ma_snd_pcm_stream_t;