相机在录像过程中将按键提示音录进视频当中
[ANSWER]
1.录像过程中将手动对焦的声音录进视频
FocusOverlayManager updateFocusFinsh方法 取消录像过程中的对焦声音
mFocusRing.startActiveFocusedFocus();
if (mFocusArea != null) {
if (mAppController.isPlaySoundEnable()) {
- mCameraSound.play(MediaActionSound.FOCUS_COMPLETE);
+ if (!(mListener instanceof VideoModule && ((VideoModule) mListener).isRecording())) {
+ mCameraSound.play(MediaActionSound.FOCUS_COMPLETE);
+ }
}
} else {
mFocusRing.centerFocusLocation();
2.录像过程中将开始录像的提示音录进视频
在开始录像之前加适当延时,确保开始录像在声音释放之后
+++ b/src/com/android/camera/VideoModule.java
@@ -2810,6 +2810,13 @@ public class VideoModule extends CameraModule implements
// Fix bug 540246 recording and music work together after we end call
mActivity.sendBroadcast(new Intent(PAUSE_ACTION));
}
+ try {
+ Thread.sleep(600);
+ } catch (Exception e){
+ e.printStackTrace();
+ }
/*}@*/
// if (useNewApi() && mShutterSoundEnable) {
// if (mCameraSound != null) {
3.录像过程将拍照和暂停的按键提示音录进视频
取消录像过程中拍照和暂停键的提示音
android:soundEffectsEnabled="false"
--- a/idh.code/vendor/sprd/platform/packages/apps/DreamCamera2/res/layout/dream_bottom_bar_contents.xml
+++ b/idh.code/vendor/sprd/platform/packages/apps/DreamCamera2/res/layout/dream_bottom_bar_contents.xml
@@ -38,6 +38,7 @@
android:background="#ff0000" -->
<com.android.camera.ui.RotateImageView
android:id="@+id/video_capture_button"
+ android:soundEffectsEnabled="false"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
@@ -112,6 +113,7 @@ android:background="#ff0000" -->
<com.android.camera.ui.RotateImageView
android:id="@+id/btn_video_pause"
+ android:soundEffectsEnabled="false"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"