I am recording audio on the android device and it will play on the device but not on the computer. I feel like its something to do with the path I give it. In the path I specify a file extension. I have tried no extension and .3gp(with the appropriate output format set) but it wont play on the computer. Can anyone shed some light on this?
VLC gives the following error
No suitable decoder module:
VLC does not support the audio or video format “samr”. Unfortunately there is no way for you to fix this.
// Set up sound recording
recorder = new MediaRecorder();
path = "/sdcard/prism/sound/";
// Make sure the directory we plan to store the recording in exists
directory = new File(path);
directory.mkdirs();
recorder.reset();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
recorder.setOutputFile(path + username + "_" + taskId + ".mpeg4");// + ".mp3");
//Sometime later after button presses recorder.prepare() and recorder.start() are called
// then after stop is pressed recorder.stop() and recorder.release() are called
Not the best solution but I am using AMR Player to convert the .amr files to .mp3.
http://www.amrplayer.com/
If someone has a better solution please answer the question and I will accept your answer instead of mine.