From db8e77cad4ac1f4fd3c7732ea9e1797bff63a943 Mon Sep 17 00:00:00 2001 From: David Reid Date: Mon, 5 Jun 2023 15:19:28 +1000 Subject: [PATCH 1/2] Fix a compilation error with the C++ build. --- miniaudio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniaudio.h b/miniaudio.h index 12976de0..c05442dd 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -74518,7 +74518,7 @@ MA_API ma_result ma_engine_read_pcm_frames(ma_engine* pEngine, void* pFramesOut, } if (pEngine->onProcess) { - pEngine->onProcess(pEngine->pProcessUserData, pFramesOut, framesRead); + pEngine->onProcess(pEngine->pProcessUserData, (float*)pFramesOut, framesRead); /* Safe cast to float* because the engine always works on floating point samples. */ } return MA_SUCCESS; From e1bfeb212aa5c7b1000ffe85f2f8de09eae799f3 Mon Sep 17 00:00:00 2001 From: David Reid Date: Mon, 5 Jun 2023 15:44:27 +1000 Subject: [PATCH 2/2] AAudio: Reverse some incorrect logic when setting up streams. --- miniaudio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniaudio.h b/miniaudio.h index c05442dd..b80f0702 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -37593,7 +37593,7 @@ static ma_result ma_create_and_configure_AAudioStreamBuilder__aaudio(ma_context* anything from Android 11 and earlier. Suggestions welcome on how we might be able to make this more targetted. */ - if (pConfig->aaudio.enableCompatibilityWorkarounds && ma_android_sdk_version() > 30) { + if (!pConfig->aaudio.enableCompatibilityWorkarounds || ma_android_sdk_version() > 30) { /* AAudio is annoying when it comes to it's buffer calculation stuff because it doesn't let you retrieve the actual sample rate until after you've opened the stream. But you need to configure