From 2d678a843ceab81e43f7ffb83212197dc10e944a Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Mon, 22 May 2023 09:20:31 +0000 Subject: [PATCH] Bug 1833633 - Reapply cubeb patch to prefer OpenSL ES on oldder Android versions. r=cubeb-reviewers,kinetik Depends on D178320 Differential Revision: https://phabricator.services.mozilla.com/D178321 --- 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 4d9b062b4382..0f53ec0b7b14 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 @@ -1605,6 +1606,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 = NULL; #ifndef DISABLE_LIBAAUDIO_DLOPEN