I am currently writing an app that calls for the recording and real time processing of audio data. For this, I am using the AudioRecord class. This works all well and good, except the default setting for recording audio on my primary testing device, a galaxy nexus, is to record from the back speaker. I am assuming most phones default record source will be the back, or bottom microphones, because when you are using the phone to call, your mouth is near the bottom.
However, my app requires that I record from the speaker on the front of the phone, and so I was hoping someone could help me with how to change the AudioRecord input source programmatically. I have searched extensively for the answer to this.
Some things I have considered are:
AudioManager am = (AudioManager)getSystemService(Context.AUDIO_SERVICE); am.setSpeakerphoneOn(true);
AudioRecord ar = new AudioRecord(AudioSource.????, ..., ..., ..., ...);
I have found that the API's are not too specific about which AudioSource formats are which, so I was wondering if anyone else has struggled with this issue and could point me in the right direction.
Thanks in advance,