Skip to content
Snippets Groups Projects
Commit 316d6fed authored by Adrien Béraud's avatar Adrien Béraud
Browse files

opensl: declare AEC interfaces as optional

Change-Id: I6ccffb6ed28255922db2ca752503c42269b982e2
parent 2be4a09a
No related branches found
No related tags found
No related merge requests found
...@@ -89,7 +89,12 @@ AudioRecorder::AudioRecorder(jami::AudioFormat sampleFormat, size_t bufSize, SLE ...@@ -89,7 +89,12 @@ AudioRecorder::AudioRecorder(jami::AudioFormat sampleFormat, size_t bufSize, SLE
SL_IID_ANDROIDACOUSTICECHOCANCELLATION, SL_IID_ANDROIDACOUSTICECHOCANCELLATION,
SL_IID_ANDROIDAUTOMATICGAINCONTROL, SL_IID_ANDROIDAUTOMATICGAINCONTROL,
SL_IID_ANDROIDNOISESUPPRESSION}; SL_IID_ANDROIDNOISESUPPRESSION};
const SLboolean req[1] = {SL_BOOLEAN_TRUE}; const SLboolean req[] = {SL_BOOLEAN_TRUE,
SL_BOOLEAN_TRUE,
SL_BOOLEAN_FALSE,
SL_BOOLEAN_FALSE,
SL_BOOLEAN_FALSE};
SLresult result; SLresult result;
result = (*slEngine)->CreateAudioRecorder(slEngine, result = (*slEngine)->CreateAudioRecorder(slEngine,
&recObjectItf_, &recObjectItf_,
...@@ -104,6 +109,7 @@ AudioRecorder::AudioRecorder(jami::AudioFormat sampleFormat, size_t bufSize, SLE ...@@ -104,6 +109,7 @@ AudioRecorder::AudioRecorder(jami::AudioFormat sampleFormat, size_t bufSize, SLE
SLint32 streamType = SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION; SLint32 streamType = SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION;
result = (*recObjectItf_) result = (*recObjectItf_)
->GetInterface(recObjectItf_, SL_IID_ANDROIDCONFIGURATION, &recordConfig); ->GetInterface(recObjectItf_, SL_IID_ANDROIDCONFIGURATION, &recordConfig);
SLASSERT(result);
result = (*recordConfig) result = (*recordConfig)
->SetConfiguration(recordConfig, ->SetConfiguration(recordConfig,
SL_ANDROID_KEY_RECORDING_PRESET, SL_ANDROID_KEY_RECORDING_PRESET,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment