Raw Mic Input

#1

Hi all,
I’m developing an app on Android which uses OpenSL to record and play audio. Due to the measurement nature of the App itself, I need to have access to the raw input of the microphone. I have already configured the AudioRecorder with the SL_ANDROID_KEY_RECORDING_PRESET, but despite this in some device it seems that a low-pass filtering takes place before the audio reaches the recorder (for example Galaxy Note 3). I also tried to retrieve the equalizer interface of the recorder through the dynamic interface manager but when I try to set new presets on it I always receive the SL_RESULT_CONTROL_LOST error.
Am I doing everything necessary to access the raw signal or I have to assume the existence of an hardware pre-filtering? How can I fix the SL_RESULT_CONTROL_LOST issue?
Thank you in advance!

#2

I am not familiar with the Android specific SL_ANDROID_KEY_RECORDING_PRESET, but are you monitoring your recorder for loss of control through the slObjectCallback()? See loss of control in section 8.29 of the OpenSL ES 1.0.1 specification. You should receive the SL_OBJECT_EVENT_ITF_CONTROL_TAKEN event prior to receiving SL_RESULT_CONTROL_LOST. This notifies you that your interface no longer has control of the object. Once your interface regains control, you will receive the SL_OBJECT_EVENT_ITF_CONTROL_RETURNED event. The timing of the CONTROL_TAKEN event might be able to tell you why you are losing control.

Best,

Erik