From 797205584366de0db0c2cee983dfd992be8dad5d Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Fri, 15 Sep 2023 14:38:51 +0000 Subject: [PATCH] Bug 1853012 - Reapply patch on top of libcubeb. r=cubeb-reviewers,chunmin Depends on D188348 Differential Revision: https://phabricator.services.mozilla.com/D188349 --- media/libcubeb/src/cubeb_aaudio.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/media/libcubeb/src/cubeb_aaudio.cpp b/media/libcubeb/src/cubeb_aaudio.cpp index d0a31b28501cf..d5fa09d013f02 100644 --- a/media/libcubeb/src/cubeb_aaudio.cpp +++ b/media/libcubeb/src/cubeb_aaudio.cpp @@ -11,6 +11,7 @@ #include "cubeb_resampler.h" #include "cubeb_triple_buffer.h" #include +#include #include #include #include @@ -1704,6 +1705,9 @@ const static struct cubeb_ops aaudio_ops = { extern "C" /*static*/ int aaudio_init(cubeb ** context, char const * /* context_name */) { + if (android_get_device_api_level() <= 30) { + return CUBEB_ERROR; + } // load api void * libaaudio = nullptr; #ifndef DISABLE_LIBAAUDIO_DLOPEN