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:
Paul Adenot 2023-11-28 13:43:21 +00:00
Родитель 2efa64207a
Коммит 3be4edbfe4
2 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -11,6 +11,7 @@
#include "cubeb_resampler.h"
#include "cubeb_triple_buffer.h"
#include <aaudio/AAudio.h>
#include <android/api-level.h>
#include <atomic>
#include <cassert>
#include <chrono>
@ -1756,6 +1757,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

Просмотреть файл

@ -18,6 +18,8 @@
#include <stdio.h>
#include <stdlib.h>
#include "mozilla/gtest/MozHelpers.h"
// #define ENABLE_NORMAL_LOG
// #define ENABLE_VERBOSE_LOG
#include "common.h"
@ -206,6 +208,8 @@ TEST(cubeb, duplex_collection_change_no_unregister)
cubeb * ctx;
int r;
mozilla::gtest::DisableCrashReporter();
r = common_init(&ctx, "Cubeb duplex example with collection change");
ASSERT_EQ(r, CUBEB_OK) << "Error initializing cubeb library";