From 409c74daf63fc2a01080ab25f20ddd360c1dbe6c Mon Sep 17 00:00:00 2001 From: Phil Burk Date: Tue, 27 Feb 2024 15:49:12 -0800 Subject: [PATCH] Fix isMMapEnabled() If policy is Unspecified then return isMMapSupported. Fixes #1967 --- src/aaudio/AAudioExtensions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aaudio/AAudioExtensions.h b/src/aaudio/AAudioExtensions.h index 3a9d782d0..eed73f373 100644 --- a/src/aaudio/AAudioExtensions.h +++ b/src/aaudio/AAudioExtensions.h @@ -89,7 +89,7 @@ class AAudioExtensions { if (loadSymbols()) return false; if (mAAudio_getMMapPolicy == nullptr) return false; int32_t policy = mAAudio_getMMapPolicy(); - return isPolicyEnabled(policy); + return (policy == Unspecified) ? mMMapSupported : isPolicyEnabled(policy); } bool isMMapSupported() {