hint
来源:互联网 发布:php代码大全 编辑:程序博客网 时间:2024/05/16 12:24
android.media.MediaRecorder
A common case of using MediaRecorder to record audio works as follows:
MediaRecorder recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.MIC); recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); recorder.setOutputFile(PATH_NAME); recorder.prepare(); recorder.start(); // Recording is now started ... recorder.stop(); recorder.reset(); // You can reuse the object by going back to setAudioSource() step recorder.release(); // Now the object cannot be reused
Applications may want to register for informational and error events in order to be informed of some internal update and possible runtime errors during recording. Registration for such events is done by setting the appropriate listeners (via calls (tosetOnInfoListener(OnInfoListener)
setOnInfoListener and/orsetOnErrorListener(OnErrorListener)
setOnErrorListener). In order to receive the respective callback associated with these listeners, applications are required to create MediaRecorder objects on threads with a Looper running (the main UI thread by default already has a Looper running).
Note: Currently, MediaRecorder does not work on the emulator.
Developer Guides
For more information about how to use MediaRecorder for recording video, read theCamera developer guide. For more information about how to use MediaRecorder for recording sound, read theAudio Capture developer guide.
Summary
- Hint
- hint
- Hint
- hint
- hint
- hint
- hint
- HINT
- HINT
- Some hint
- Hint 多样性
- Full Hint
- Oracle Hint
- Oracle Hint
- Oracle Hint
- oracle hint
- oracle Hint
- Oracle Hint .
- FusionCharts制作报表
- 查看SQLLITE数据库
- vba学习备忘003——C语言中的字符挪到vba之后
- java中类的关系图
- Unix/linux调试的瑞士军刀:lsof
- hint
- java内存分析
- CRichEditCtrl系列讲堂7 设置行间距源代码
- java基础
- HOG特征
- Oracle闪回技术之一Oracle 11g 利用FlashTable (闪回表)恢复(用delete)误删的数据
- 爱笑程序员-笑话10则
- myeclipse不编译解决方法
- CRichEditCtrl系列讲堂8 解决CEdit/CRichEdit中SetSel错位或者位置判断错误的问题