MediaRecorder cuts off end of file

bizcrack

New Member
In my application, I am recording audio in m4a (AAC encoded) using MediaRecorder. All my recordings are cut short (by about half a second). For the purposes of my application, it is important that I have the entire file. Is this a bug or is there something I am missing?Record Code:\[code\] //set up recorder recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_RECOGNITION); recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); recorder.setAudioChannels(1); recorder.setAudioSamplingRate(16000); recorder.setOutputFile(fileName); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); //begin recording recorder.prepare(); recorder.start();\[/code\]Stop Record Code:\[code\] //stop recording recorder.stop(); recorder.release(); recorder = null;\[/code\]
 
Top