forked from mirrors/gecko-dev
Bug 1814359 - Reapply in-tree patch for libcubeb. r=cubeb-reviewers,kinetik
Depends on D170348 Differential Revision: https://phabricator.services.mozilla.com/D170349
This commit is contained in:
parent
06a40cfefc
commit
920565cbe5
1 changed files with 4 additions and 0 deletions
|
|
@ -11,6 +11,7 @@
|
||||||
#include "cubeb_resampler.h"
|
#include "cubeb_resampler.h"
|
||||||
#include "cubeb_triple_buffer.h"
|
#include "cubeb_triple_buffer.h"
|
||||||
#include <aaudio/AAudio.h>
|
#include <aaudio/AAudio.h>
|
||||||
|
#include <android/api-level.h>
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
@ -1549,6 +1550,9 @@ const static struct cubeb_ops aaudio_ops = {
|
||||||
extern "C" /*static*/ int
|
extern "C" /*static*/ int
|
||||||
aaudio_init(cubeb ** context, char const * /* context_name */)
|
aaudio_init(cubeb ** context, char const * /* context_name */)
|
||||||
{
|
{
|
||||||
|
if (android_get_device_api_level() <= 30) {
|
||||||
|
return CUBEB_ERROR;
|
||||||
|
}
|
||||||
// load api
|
// load api
|
||||||
void * libaaudio = NULL;
|
void * libaaudio = NULL;
|
||||||
#ifndef DISABLE_LIBAAUDIO_DLOPEN
|
#ifndef DISABLE_LIBAAUDIO_DLOPEN
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue