I am trying to work with audiorecorder, but I am getting illegal argument exceptions stating that the audiorecorder is not initialised.
My code is like the one shown here
private static final int RECORDER_SAMPLERATE = 44100;
private static final int RECORDER_CHANNELS = AudioFormat.CHANNEL_IN_STEREO;
private static final int RECORDER_AUDIO_ENCODING = AudioFormat.ENCODING_PCM_16BIT;
recorder = new AudioRecord(MediaRecorder.AudioSource.MIC,RECORDER_SAMPLERATE, RECORDER_CHANNELS,RECORDER_AUDIO_ENCODING, bufferSize);
recorder.startRecording();
I have seen another answer which seems to work for some people but it isn't working for me AudioRecord object not initializing