         let outputSampleRate = options?.sampleRate ?? srcFormat.mSampleRate
         let outputChannels = options?.channels ?? srcFormat.mChannelsPerFrame
         var outputBitRate = options?.bitDepth ?? srcFormat.mBitsPerChannel
+
+        guard inputFormat != outputFormat ||
+            outputSampleRate != srcFormat.mSampleRate ||
+            outputChannels != srcFormat.mChannelsPerFrame ||
+            outputBitRate != srcFormat.mBitsPerChannel else {
+            completionHandler?(createError(message: "No conversion is needed, formats are the same."))
+            return
+        }
 
         var outputBytesPerFrame = outputBitRate * outputChannels / 8
         var outputBytesPerPacket = options?.bitDepth == nil ? srcFormat.mBytesPerPacket : outputBytesPerFrame

            return
        }

        let outputFormat = options?.format ?? outputURL.pathExtension.lowercased()

        AKLog("convertToPCM() to \(outputURL)")

        var srcFormat = AudioStreamBasicDescription()
        var dstFormat = AudioStreamBasicDescription()

        error = ExtAudioFileOpenURL(inputURL as CFURL, &sourceFile)
        if error != noErr {
            completionHandler?(createError(message: "Unable to open the input file."))
            return
        }

        var thePropertySize = UInt32(MemoryLayout.stride(ofValue: srcFormat))

        guard let inputFile = sourceFile else {
