|
@@ -48,6 +48,7 @@ class BFVoiceRecordManager: NSObject {
|
|
|
|
|
|
/// 开始录音
|
|
|
func startRecord() {
|
|
|
+ BFLog(2, message: "开始录音 \(Date().timeIntervalSince1970)")
|
|
|
if isStoping {
|
|
|
BFLog(2, message: "正在停止中,这次开始无效.")
|
|
|
return
|
|
@@ -75,16 +76,11 @@ class BFVoiceRecordManager: NSObject {
|
|
|
/// 停止录制
|
|
|
/// - Parameter isCancel: 是否为取消 ,取消操作会把录制的文件删除和字幕删除
|
|
|
func stopRecord(isCancel: Bool) {
|
|
|
-
|
|
|
- //STATE_STOP
|
|
|
- if(!(audioRecorder?.voiceRecorder.isStoped() ?? false)){
|
|
|
- isStoping = true
|
|
|
- mIsCancel = isCancel
|
|
|
- audioRecorder?.stopRecord()
|
|
|
- }else{
|
|
|
- BFLog(2, message: "已经是停止状态")
|
|
|
- }
|
|
|
-
|
|
|
+ BFLog(2, message: "结束录音 \(Date().timeIntervalSince1970)")
|
|
|
+ isStoping = true
|
|
|
+ mIsCancel = isCancel
|
|
|
+ audioRecorder?.stopRecord()
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|