diff --git a/examples/engine_sdl.c b/examples/engine_sdl.c index 9b07385d..05a8bf76 100644 --- a/examples/engine_sdl.c +++ b/examples/engine_sdl.c @@ -22,10 +22,12 @@ static ma_sound g_sound; /* This example will play only a single soun void data_callback(void* pUserData, ma_uint8* pBuffer, int bufferSizeInBytes) { + ma_uint32 bufferSizeInFrames; + (void)pUserData; /* Reading is just a matter of reading straight from the engine. */ - ma_uint32 bufferSizeInFrames = (ma_uint32)bufferSizeInBytes / ma_get_bytes_per_frame(ma_format_f32, ma_engine_get_channels(&g_engine)); + bufferSizeInFrames = (ma_uint32)bufferSizeInBytes / ma_get_bytes_per_frame(ma_format_f32, ma_engine_get_channels(&g_engine)); ma_engine_read_pcm_frames(&g_engine, pBuffer, bufferSizeInFrames, NULL); } diff --git a/examples/engine_steamaudio.c b/examples/engine_steamaudio.c index 5340e448..ade30fa7 100644 --- a/examples/engine_steamaudio.c +++ b/examples/engine_steamaudio.c @@ -17,7 +17,17 @@ of buffering solution to your node. #include "../miniaudio.c" #include /* Required for uint32_t which is used by STEAMAUDIO_VERSION, and a random use of uint8_t. If there's a Steam Audio maintainer reading this, that needs to be fixed to use IPLuint32 and IPLuint8. */ + +/* Need to silence some warnings from the Steam Audio headers. */ +#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wlong-long" + #pragma GCC diagnostic ignored "-Wpedantic" +#endif #include /* Steam Audio */ +#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) + #pragma GCC diagnostic pop +#endif #define FORMAT ma_format_f32 /* Must be floating point. */ #define CHANNELS 2 /* Must be stereo for this example. */