소스 검색

已经停止状态逻辑处理

jsonwang 3 년 전
부모
커밋
fbdcd3ace7
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: "已经是停止状态")
+        }
+     
     }
 }