浏览代码

1.merge master

wenweiwei 3 年之前
父节点
当前提交
dfd5b273f4
共有 1 个文件被更改,包括 10 次插入3 次删除
  1. 10 3
      BFRecordScreenKit/Classes/BFVoiceRecordManager.swift

+ 10 - 3
BFRecordScreenKit/Classes/BFVoiceRecordManager.swift

@@ -65,9 +65,16 @@ class BFVoiceRecordManager: NSObject {
     /// 停止录制
     /// - Parameter isCancel: 是否为取消 ,取消操作会把录制的文件删除和字幕删除
     func stopRecord(isCancel: Bool) {
-        isStoping = true
-        mIsCancel = isCancel
-        audioRecorder?.stopRecord()
+        
+        //STATE_STOP
+        if(!(audioRecorder?.voiceRecorder.isStoped() ?? false)){
+            isStoping = true
+            mIsCancel = isCancel
+            audioRecorder?.stopRecord()
+        }else{
+            BFLog(2, message: "已经是停止状态")
+        }
+     
     }
 }