Skip to content

Commit

Permalink
iOS-native: fix record voice - play mode send voice duration error bug
Browse files Browse the repository at this point in the history
  • Loading branch information
huangminlinux committed Jul 2, 2018
1 parent e928b90 commit 5f54238
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions iOS/IMUIInputView/Controllers/IMUIRecordVoiceHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,6 @@ class IMUIRecordVoiceHelper: NSObject {
print(error.localizedDescription)
}

// let recordSettings:[String : AnyObject] = [
// AVFormatIDKey: NSNumber(value: kAudioFormatAppleIMA4 as UInt32),
// AVNumberOfChannelsKey: 1 as AnyObject,
// AVSampleRateKey : 16000.0 as AnyObject
// ]

let recordSettings = [
AVFormatIDKey: Int(kAudioFormatMPEG4AAC),
AVSampleRateKey: 16000,
Expand Down
2 changes: 1 addition & 1 deletion iOS/IMUIInputView/Views/IMUIRecordVoiceCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class IMUIRecordVoiceCell: UICollectionViewCell, IMUIFeatureCellProtocol {
self.resetSubViewsStyle()

let finishiRecorder = recordHelper.finishRecordingCompletion()
self.featureDelegate?.didRecordVoice(with: finishiRecorder.voiceFilePath, durationTime: finishiRecorder.duration)
self.featureDelegate?.didRecordVoice(with: self.finishiRecorderCache!.voiceFilePath, durationTime: self.finishiRecorderCache!.duration)
recordHelper.recordPath = nil
}

Expand Down

0 comments on commit 5f54238

Please sign in to comment.