mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1791839 - Update cubeb to revision 4783607. r=cubeb-reviewers,kinetik
Depends on D157856 Differential Revision: https://phabricator.services.mozilla.com/D157880
This commit is contained in:
parent
b7eeae5027
commit
93d6b111c7
@ -9,8 +9,8 @@ origin:
|
|||||||
description: "Cross platform audio library"
|
description: "Cross platform audio library"
|
||||||
url: https://github.com/mozilla/cubeb
|
url: https://github.com/mozilla/cubeb
|
||||||
license: ISC
|
license: ISC
|
||||||
release: 4783607ecc09e9493677a9c4e3db95f78d87409a (2022-09-06T12:38:56Z).
|
release: bc0450628e120dbee89fb8ad0b29abbd24dc3729 (2022-09-21T20:32:32Z).
|
||||||
revision: 4783607ecc09e9493677a9c4e3db95f78d87409a
|
revision: bc0450628e120dbee89fb8ad0b29abbd24dc3729
|
||||||
|
|
||||||
vendoring:
|
vendoring:
|
||||||
url: https://github.com/mozilla/cubeb
|
url: https://github.com/mozilla/cubeb
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
#ifndef _CUBEB_SLES_H_
|
|
||||||
#define _CUBEB_SLES_H_
|
|
||||||
#include <OpenSLESProvider.h>
|
|
||||||
#include <SLES/OpenSLES.h>
|
|
||||||
|
|
||||||
static SLresult cubeb_get_sles_engine(
|
|
||||||
SLObjectItf *pEngine,
|
|
||||||
SLuint32 numOptions,
|
|
||||||
const SLEngineOption *pEngineOptions,
|
|
||||||
SLuint32 numInterfaces,
|
|
||||||
const SLInterfaceID *pInterfaceIds,
|
|
||||||
const SLboolean * pInterfaceRequired) {
|
|
||||||
return mozilla_get_sles_engine(pEngine, numOptions, pEngineOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void cubeb_destroy_sles_engine(SLObjectItf *self) {
|
|
||||||
mozilla_destroy_sles_engine(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Only synchronous operation is supported, as if the second
|
|
||||||
parameter was FALSE. */
|
|
||||||
static SLresult cubeb_realize_sles_engine(SLObjectItf self) {
|
|
||||||
return mozilla_realize_sles_engine(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
@ -632,7 +632,7 @@ cubeb_enumerate_devices(cubeb * context, cubeb_device_type devtype,
|
|||||||
int rv;
|
int rv;
|
||||||
if ((devtype & (CUBEB_DEVICE_TYPE_INPUT | CUBEB_DEVICE_TYPE_OUTPUT)) == 0)
|
if ((devtype & (CUBEB_DEVICE_TYPE_INPUT | CUBEB_DEVICE_TYPE_OUTPUT)) == 0)
|
||||||
return CUBEB_ERROR_INVALID_PARAMETER;
|
return CUBEB_ERROR_INVALID_PARAMETER;
|
||||||
if (collection == NULL)
|
if (context == NULL || collection == NULL)
|
||||||
return CUBEB_ERROR_INVALID_PARAMETER;
|
return CUBEB_ERROR_INVALID_PARAMETER;
|
||||||
if (!context->ops->enumerate_devices)
|
if (!context->ops->enumerate_devices)
|
||||||
return CUBEB_ERROR_NOT_SUPPORTED;
|
return CUBEB_ERROR_NOT_SUPPORTED;
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "android/cubeb-output-latency.h"
|
#include "android/cubeb-output-latency.h"
|
||||||
#include "cubeb-internal.h"
|
#include "cubeb-internal.h"
|
||||||
#include "cubeb-sles.h"
|
|
||||||
#include "cubeb/cubeb.h"
|
#include "cubeb/cubeb.h"
|
||||||
#include "cubeb_android.h"
|
#include "cubeb_android.h"
|
||||||
#include "cubeb_array_queue.h"
|
#include "cubeb_array_queue.h"
|
||||||
@ -728,14 +727,14 @@ opensl_init(cubeb ** context, char const * context_name)
|
|||||||
const SLEngineOption opt[] = {{SL_ENGINEOPTION_THREADSAFE, SL_BOOLEAN_TRUE}};
|
const SLEngineOption opt[] = {{SL_ENGINEOPTION_THREADSAFE, SL_BOOLEAN_TRUE}};
|
||||||
|
|
||||||
SLresult res;
|
SLresult res;
|
||||||
res = cubeb_get_sles_engine(&ctx->engObj, 1, opt, 0, NULL, NULL);
|
res = f_slCreateEngine(&ctx->engObj, 1, opt, 0, NULL, NULL);
|
||||||
|
|
||||||
if (res != SL_RESULT_SUCCESS) {
|
if (res != SL_RESULT_SUCCESS) {
|
||||||
opensl_destroy(ctx);
|
opensl_destroy(ctx);
|
||||||
return CUBEB_ERROR;
|
return CUBEB_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = cubeb_realize_sles_engine(ctx->engObj);
|
res = (*ctx->engObj)->Realize(ctx->engObj, SL_BOOLEAN_FALSE);
|
||||||
if (res != SL_RESULT_SUCCESS) {
|
if (res != SL_RESULT_SUCCESS) {
|
||||||
opensl_destroy(ctx);
|
opensl_destroy(ctx);
|
||||||
return CUBEB_ERROR;
|
return CUBEB_ERROR;
|
||||||
@ -796,10 +795,12 @@ opensl_get_max_channel_count(cubeb * ctx, uint32_t * max_channels)
|
|||||||
static void
|
static void
|
||||||
opensl_destroy(cubeb * ctx)
|
opensl_destroy(cubeb * ctx)
|
||||||
{
|
{
|
||||||
if (ctx->outmixObj)
|
if (ctx->outmixObj) {
|
||||||
(*ctx->outmixObj)->Destroy(ctx->outmixObj);
|
(*ctx->outmixObj)->Destroy(ctx->outmixObj);
|
||||||
if (ctx->engObj)
|
}
|
||||||
cubeb_destroy_sles_engine(&ctx->engObj);
|
if (ctx->engObj) {
|
||||||
|
(*ctx->engObj)->Destroy(ctx->engObj);
|
||||||
|
}
|
||||||
dlclose(ctx->lib);
|
dlclose(ctx->lib);
|
||||||
if (ctx->p_output_latency_function)
|
if (ctx->p_output_latency_function)
|
||||||
cubeb_output_latency_unload_method(ctx->p_output_latency_function);
|
cubeb_output_latency_unload_method(ctx->p_output_latency_function);
|
||||||
|
Loading…
Reference in New Issue
Block a user