I'm porting an audio capture loop from Java (using AudioRecord
class) to a native library using OpenSL.
The reason for this is that after profiling, the capture loop is consuming in our test phones around 2% less CPU in OpenSL. That is a significative gain!
The constructor for the Java AudioRecord class receives a source
parameter that can be configured to several values (MIC, CAMCORDER, VOICE_DOWNLINK
, etc.)
So far, I haven't been able to find the equivalence (if there exists) for the source parameter in OpenSL.
Does anybody know if there's a way to specify this Source parameter for the AudioRecorder object?
Cheers!