I tried to get the SLDeviceVolumeItfinterface RecorderObjecton Android, but got an error:SL_RESULT_FEATURE_UNSUPPORTED.
I read that the OpenSL ES implementation in Android does not support volume setting for AudioRecorder. It's true?
If so, is there a workaround? I have a VOIP application that doesn't reflect very well on the Galaxy Nexus due to the very high microphone gain.
I also tried installing SL_IID_ANDROIDCONFIGURATIONto install streamTypein a new audio source VOICE_COMMUNINCATION, but again I get error 12 (not supported).
// create audio recorder
const SLInterfaceID id[2] = { SL_IID_ANDROIDSIMPLEBUFFERQUEUE, SL_IID_ANDROIDCONFIGURATION };
const SLboolean req[2] = { SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE };
result = (*engine)->CreateAudioRecorder(engine, &recorderObject, &audioSrc, &audioSnk, 2, id, req);
if (SL_RESULT_SUCCESS != result) {
return false;
}
SLAndroidConfigurationItf recorderConfig;
result = (*recorderObject)->GetInterface(recorderObject, SL_IID_ANDROIDCONFIGURATION, &recorderConfig);
if(result != SL_RESULT_SUCCESS) {
error("failed to get SL_IID_ANDROIDCONFIGURATION interface. e == %d", result);
}
recorderObject, SL_IID_ANDROIDCONFIGURATION.
Galaxy Nexus (ICS), HTC sense (ICS) Motorola Blur (Gingerbread).
NDK 6.