瀏覽代碼

调整判断的延时时长

harry 3 年之前
父節點
當前提交
0ca94b391a
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

+ 4 - 4
BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

@@ -462,9 +462,9 @@ public class BFRecordScreenController: BFBaseViewController {
                     newSubtitle.timelineIn = (self?.recorderManager?.voiceModel?.startCMTime.seconds ?? 0.0) + Float64((((payload?["begin_time"]) as? Int) ?? 0) + 300) / 1000.0
                     newSubtitle.timelineOut = (self?.recorderManager?.voiceModel?.startCMTime.seconds ?? 0.0) + Float64(((payload?["time"]) as? Int) ?? 0) / 1000.0
                     
-                    if newSubtitle.timelineIn - 0.2 > (self?.recorderManager?.voiceModel?.endCMTime.seconds ?? 0) {
+                    if newSubtitle.timelineIn - 0.1 > (self?.recorderManager?.voiceModel?.endCMTime.seconds ?? 0) {
                         BFLog(1, message: "卡在录音尾巴上了1")
-                        newSubtitle.timelineIn -= 0.2
+                        newSubtitle.timelineIn -= 0.1
                     }
                 } else {
                     if let voice = self?.itemModels[self?.currItemModelIndex ?? 0].voiceStickers.first(where: { m in
@@ -473,9 +473,9 @@ public class BFRecordScreenController: BFBaseViewController {
                         newSubtitle.timelineIn = voice.startCMTime.seconds + Float64((((payload?["begin_time"]) as? Int) ?? 0) + 300) / 1000.0
                         newSubtitle.timelineOut = voice.startCMTime.seconds + Float64(((payload?["time"]) as? Int) ?? 0) / 1000.0
                         
-                        if newSubtitle.timelineIn - 0.2 > (voice.endCMTime.seconds ) {
+                        if newSubtitle.timelineIn - 0.1 > (voice.endCMTime.seconds ) {
                             BFLog(1, message: "卡在录音尾巴上了1")
-                            newSubtitle.timelineIn -= 0.2
+                            newSubtitle.timelineIn -= 0.1
                         }
                     }