     var endTime: Double
     var audioTimeStart: AVAudioTime?
     var audioFile: AKAudioFile?
-    var completion: AKRecordingResult
+    var completion: ClipRecordingCompletion
     var tap: AVAudioNodeTapBlock?
     init(start: Double = 0,
          end: Double = Double.greatestFiniteMagnitude,
          audioFile: AKAudioFile? = nil,
-         completion: @escaping AKRecordingResult) {
+         completion: @escaping ClipRecordingCompletion) {
 
         startTime = start
         endTime = end
         var called = false
-        self.completion = { (url: URL?, actualStart: Double, error: Error?) in
+        self.completion = { result in
             if called {
                 return
             }
             called = true
-            completion(url, actualStart, error)
+            completion(result)
         }
         self.audioFile = audioFile
     }

        }

        guard let audioFile = clip.audioFile, audioFile.length > 0 else {
            clip.completion(nil, 0, error ?? ClipRecordingError.clipIsEmpty)
            completion?()
            return
        }

    ///   - duration: The duration in seconds of the clip to record, will be adjusted if start time
    /// was adjusted.
    ///   - tap: An optional tap to access audio as it's being recorded.
    ///   - completion: A closure that will be called when the clip is finished recording. time and duration may be different in the result.
    ///
    public func recordClip(time: Double = 0,
                           duration: Double = Double.greatestFiniteMagnitude,
                           tap: AVAudioNodeTapBlock? = nil,
                           completion: @escaping ClipRecordingCompletion) throws {

        guard time >= 0, duration > 0, time + duration > timing.currentTime else {
            throw ClipRecordingError.invalidParameters
