зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1864143 - Reapply patches on top of libcubeb. r=cubeb-reviewers,kinetik
Differential Revision: https://phabricator.services.mozilla.com/D194219
This commit is contained in:
Родитель
2efa64207a
Коммит
3be4edbfe4
|
@ -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>
|
||||||
|
@ -1756,6 +1757,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 = nullptr;
|
void * libaaudio = nullptr;
|
||||||
#ifndef DISABLE_LIBAAUDIO_DLOPEN
|
#ifndef DISABLE_LIBAAUDIO_DLOPEN
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "mozilla/gtest/MozHelpers.h"
|
||||||
|
|
||||||
// #define ENABLE_NORMAL_LOG
|
// #define ENABLE_NORMAL_LOG
|
||||||
// #define ENABLE_VERBOSE_LOG
|
// #define ENABLE_VERBOSE_LOG
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
@ -206,6 +208,8 @@ TEST(cubeb, duplex_collection_change_no_unregister)
|
||||||
cubeb * ctx;
|
cubeb * ctx;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
mozilla::gtest::DisableCrashReporter();
|
||||||
|
|
||||||
r = common_init(&ctx, "Cubeb duplex example with collection change");
|
r = common_init(&ctx, "Cubeb duplex example with collection change");
|
||||||
ASSERT_EQ(r, CUBEB_OK) << "Error initializing cubeb library";
|
ASSERT_EQ(r, CUBEB_OK) << "Error initializing cubeb library";
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче