 
         let queue = DispatchQueue(label: "io.audiokit.AKConverter.start", qos: .utility)
 
-        //session.progress could be sent out via a delegate for this session
+        // session.progress could be sent out via a delegate for this session
         writerInput.requestMediaDataWhenReady(on: queue, using: {
             while writerInput.isReadyForMoreMediaData {
-
                 if reader.status == .failed {
                     AKLog("Conversion Failed")
                     break


        // Note: AVAssetReaderOutput does not currently support compressed output
        if formatKey == kAudioFormatMPEG4AAC {

            if sampleRate > 48_000 {
                sampleRate = 44_100
            }

    // Currently, as of 2017, if you want to convert from a compressed
    // format to a pcm one, you still have to hit CoreAudio
    private func convertToPCM(completionHandler: AKConverterCallback? = nil) {
        guard let inputURL = self.inputURL else {
            completionHandler?(createError(message: "Input file can't be nil."))
            return
