mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 10f8441b42a1 (bug 1015932)
This commit is contained in:
parent
59d5dc5477
commit
45ecd2ab6d
@ -1,20 +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);
|
||||
}
|
||||
|
||||
#endif
|
@ -21,7 +21,6 @@
|
||||
#include "cubeb/cubeb.h"
|
||||
#include "cubeb-internal.h"
|
||||
#include "cubeb_resampler.h"
|
||||
#include "cubeb-sles.h"
|
||||
|
||||
static struct cubeb_ops const opensl_ops;
|
||||
|
||||
@ -264,8 +263,7 @@ opensl_init(cubeb ** context, char const * context_name)
|
||||
const SLEngineOption opt[] = {{SL_ENGINEOPTION_THREADSAFE, SL_BOOLEAN_TRUE}};
|
||||
|
||||
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) {
|
||||
opensl_destroy(ctx);
|
||||
return CUBEB_ERROR;
|
||||
@ -444,7 +442,7 @@ opensl_destroy(cubeb * ctx)
|
||||
if (ctx->outmixObj)
|
||||
(*ctx->outmixObj)->Destroy(ctx->outmixObj);
|
||||
if (ctx->engObj)
|
||||
cubeb_destroy_sles_engine(&ctx->engObj);
|
||||
(*ctx->engObj)->Destroy(ctx->engObj);
|
||||
dlclose(ctx->lib);
|
||||
dlclose(ctx->libmedia);
|
||||
free(ctx);
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include <assert.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "OpenSLESProvider.h"
|
||||
#include "webrtc/modules/audio_device/android/audio_common.h"
|
||||
#include "webrtc/modules/audio_device/android/opensles_common.h"
|
||||
#include "webrtc/modules/audio_device/android/single_rw_fifo.h"
|
||||
@ -117,13 +116,9 @@ int32_t OpenSlesInput::Init() {
|
||||
}
|
||||
|
||||
// Set up OpenSL engine.
|
||||
#ifndef MOZILLA_INTERNAL_API
|
||||
OPENSL_RETURN_ON_FAILURE(f_slCreateEngine(&sles_engine_, 1, kOption, 0,
|
||||
NULL, NULL),
|
||||
-1);
|
||||
#else
|
||||
OPENSL_RETURN_ON_FAILURE(mozilla_get_sles_engine(&sles_engine_, 1, kOption), -1);
|
||||
#endif
|
||||
OPENSL_RETURN_ON_FAILURE((*sles_engine_)->Realize(sles_engine_,
|
||||
SL_BOOLEAN_FALSE),
|
||||
-1);
|
||||
@ -143,11 +138,7 @@ int32_t OpenSlesInput::Init() {
|
||||
int32_t OpenSlesInput::Terminate() {
|
||||
// It is assumed that the caller has stopped recording before terminating.
|
||||
assert(!recording_);
|
||||
#ifndef MOZILLA_INTERNAL_API
|
||||
(*sles_engine_)->Destroy(sles_engine_);
|
||||
#else
|
||||
mozilla_destroy_sles_engine(&sles_engine_);
|
||||
#endif
|
||||
initialized_ = false;
|
||||
mic_initialized_ = false;
|
||||
rec_initialized_ = false;
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include <assert.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "OpenSLESProvider.h"
|
||||
#include "webrtc/modules/audio_device/android/opensles_common.h"
|
||||
#include "webrtc/modules/audio_device/android/fine_audio_buffer.h"
|
||||
#include "webrtc/modules/audio_device/android/single_rw_fifo.h"
|
||||
@ -117,13 +116,9 @@ int32_t OpenSlesOutput::Init() {
|
||||
}
|
||||
|
||||
// Set up OpenSl engine.
|
||||
#ifndef MOZILLA_INTERNAL_API
|
||||
OPENSL_RETURN_ON_FAILURE(f_slCreateEngine(&sles_engine_, 1, kOption, 0,
|
||||
NULL, NULL),
|
||||
-1);
|
||||
#else
|
||||
OPENSL_RETURN_ON_FAILURE(mozilla_get_sles_engine(&sles_engine_, 1, kOption), -1);
|
||||
#endif
|
||||
OPENSL_RETURN_ON_FAILURE((*sles_engine_)->Realize(sles_engine_,
|
||||
SL_BOOLEAN_FALSE),
|
||||
-1);
|
||||
@ -156,11 +151,7 @@ int32_t OpenSlesOutput::Terminate() {
|
||||
// It is assumed that the caller has stopped recording before terminating.
|
||||
assert(!playing_);
|
||||
(*sles_output_mixer_)->Destroy(sles_output_mixer_);
|
||||
#ifndef MOZILLA_INTERNAL_API
|
||||
(*sles_engine_)->Destroy(sles_engine_);
|
||||
#else
|
||||
mozilla_destroy_sles_engine(&sles_engine_);
|
||||
#endif
|
||||
initialized_ = false;
|
||||
speaker_initialized_ = false;
|
||||
play_initialized_ = false;
|
||||
|
Loading…
Reference in New Issue
Block a user