I am trying to record audio using PhoneGap on Android. I want to record in .WAV format.
Code: JavaScript
media.startRecord();
I found that this function record audio in .3gp format by default. If I change the source code of PhoneGap to record in different format. (can be in .amr format)
Code: JAVA, File: AudioPlayer.java
this.recorder = new MediaRecorder(); this.recorder.setAudioSource(MediaRecorder.AudioSource.MIC); this.recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); // THREE_GPP); this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT); //AMR_NB);
But I also found that Android do not support to record in .wav format.http://developer.android.com/guide/appendix/media-formats.html
I don't want to use capture.captureAudio function because that launches an external application.
Please suggest me solution.