Skip to content

Commit

Permalink
Fix isMMapEnabled()
Browse files Browse the repository at this point in the history
If policy is Unspecified then return isMMapSupported.

Fixes #1967
  • Loading branch information
philburk committed Feb 27, 2024
1 parent 86165b8 commit 409c74d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aaudio/AAudioExtensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 409c74d

Please sign in to comment.