Android Mediarecorder录制的时候屏蔽掉声音
项目需求,在拍摄音视频时候将声音屏蔽,找了有关方面的资料,现总结下:
一、在原有工程中使用如下代码:
mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
if (SettingsUtils.SETTINGS_SHOW_VOICE_SWITCH == 0){
mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
}else{
mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.VOICE_UPLINK);
}
if (DrivingRecorderUtil.CURSDKVERSION >= 8) {
CamcorderProfile targetProfile = CamcorderProfile
.get(CamcorderProfile.QUALITY_HIGH);
mMediaRecorder.setProfile(targetProfile);
} else {
mMediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder
最后
以上就是朴实流沙最近收集整理的关于Android Mediarecorder录制的时候屏蔽掉声音的全部内容,更多相关Android内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复