Android录音模块UML类图
2018-01-22 13:49:28 90 举报
Android录音模块类图,实现了录音(支持amr,mp3格式),录音播放功能
作者其他创作
大纲/内容
录音帧数据
录音结果回调
AudioPlayMgr
+ OnPlayListener listener
+ play(String filePath)+ pausePlay()+ resumePlay()+ stopPlay()
Mp3编码线程
Mp3EncoderThread
+ LameUtil lameUtil
+ encode()
音频编码基类
OnPlayListener
录音实体类
OnTimerPlayListener
+ void onPlayProgress(int time)
倒计时
计时音频播放
计时播放回调
录音配置类
PcmData
+ byte[] data+ int size
VoiceEntity
+ String filePath+ String format+ object extra
TimerVoiceRecordMgr
+ int maxDuration//设置最大时长
播放回调
计时录音回调
CollectPcmDataThread
+ OnRecordCallback callback
+ startRecord+ pauseRecord+ resumeRecord+ stopRecord+ checkPermission()
音频数据采集线程
TimerAudioPlayMgr
+ CountdownTimer timer+ OnTimerPlayListener listener
音频播放类
计时录音管理类
OnTimerRecordListener
+ onProgressRecord(int duration)
录音进度回调
mp3lame.so
AudioRecorder.OnRecordPositionUpdateListener
+ void onMarkerReached(AudioRecord recorder);+ void onPeriodicNotification(AudioRecord recorder);
音频数据采集通知
OnRecordCallback
Mp3编码库
录音管理类
SecondTimer
+ TimerTask timerTask
+ start()+ pause()+ stop()
RecordOption
+ String filePath+ int formatType
Mp3编码工具类
EncoderThread
+ List dataQueue+ OnRecordCallback callback
+ abstract encode()+ onMarkerReached()+ onPeriodicNotification+ addPcmData(PcmData data)+ pauseEncode+ stopEncode
CountdownTimer
OnRecordListener
LameUtil
+ init()+ encode()+ flush()+ close()
秒表
VoiceRecordMgr
+ CollectPcmDataThread recorder+ EncoderThread encoder+ OnRecordListener onRecordListener
+ startRecord(RecordOption option)+ pauseRecord()+ resumeRecord()+ stopRecord()
收藏
0 条评论
下一页