Ver Fonte

已经停止状态逻辑处理

jsonwang há 3 anos atrás
pai
commit
fbdcd3ace7
1 ficheiros alterados com 10 adições e 3 exclusões
  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: "已经是停止状态")
+        }
+     
     }
 }