Error when creating Output Mix in OpenSL ES

54 views
Skip to first unread message

M.Cemil Guney

unread,
Nov 26, 2016, 10:54:42 AM11/26/16
to android-ndk

I edited some parts of native-audio example according to my own project. I encounter this error while creating an output-mix.

E/AudioEffect: set(): AudioFlinger could not create effect, status: -1
E/libOpenSLES: Effect initCheck() returned -19
E/libOpenSLES: EnvironmentalReverb effect initialization failed

I did not change the create engine part of the project. But the error is out from there.

// create output mix, with environmental reverb specified as a non-required interface
const SLInterfaceID ids[1] = {SL_IID_ENVIRONMENTALREVERB};
const SLboolean req[1] = {SL_BOOLEAN_FALSE};
result = (*engineEngine)->CreateOutputMix(engineEngine, &outputMixObject, 1, ids, req);
assert(SL_RESULT_SUCCESS == result);
(void)result;

// realize the output mix
result = (*outputMixObject)->Realize(outputMixObject, SL_BOOLEAN_FALSE);
assert(SL_RESULT_SUCCESS == result);
(void)result;

Glenn Kasten

unread,
Dec 5, 2016, 11:05:03 AM12/5/16
to android-ndk
Check the logs to find out the cause. If it is due to a permission problem,
you may declare the permission both in the manifest and dynamically request at runtime as of M.
Reply all
Reply to author
Forward
0 new messages