经过测试,M4A格式的录音文件,每秒大约2kb;

IOS是可以播放M4A格式的。

 

mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);

mRecorder.setOutputFile(System.currentTimeMillis()+".m4a");

 

至于其他格式的文件说明:

http://developer.android.com/guide/appendix/media-formats.html#core

参考文档:

http://stackoverflow.com/questions/18154596/creating-audio-file-in-internal-memory-in-android

更多推荐