I hope someone could help me with this issue.
Some time ago I developed an application in order to record simultaneously the sound captured by the front mic and the
I had the same problem, and I got it to work using a sample rate of 48000 Hz. I figured it would work since the video recordings made with the default camera app worked in stereo and had this sampling rate. This frequency must also be considered when using the function getMinBufferSize().
Here are my settings:
private static final int RECORDER_BPP = 16;
private static final int RECORDER_SAMPLERATE = 48000;
private static final int RECORDER_CHANNELS = AudioFormat.CHANNEL_IN_STEREO;
private static final int RECORDER_AUDIO_ENCODING = AudioFormat.ENCODING_PCM_16BIT;
and then I create the AudioRecord object with:
recorder = new AudioRecord(MediaRecorder.AudioSource.CAMCORDER,
RECORDER_SAMPLERATE, RECORDER_CHANNELS,RECORDER_AUDIO_ENCODING, bufferSize);
I am using the Moto G, with KitKat installed.