     // Here is where we actually check the device type and make the settings, if needed
     private func setFormatForDevice() -> AVAudioFormat? {
         #if os(iOS) && !targetEnvironment(simulator)
+        let numChannels = AudioKit.engine.inputNode.inputFormat(forBus: 0).channelCount
         var desiredFS = AudioKit.engine.inputNode.inputFormat(forBus: 0).sampleRate
         let typeString = getIphoneType()
         let stringArray = typeString.components(separatedBy: CharacterSet.decimalDigits.inverted)

        #else
        let desiredFS = AKSettings.sampleRate
        #endif
        return AVAudioFormat(standardFormatWithSampleRate: desiredFS, channels: 2)
    }
}

    override public init() {
        super.init()
        self.avAudioNode = mixer
        AKSettings.audioInputEnabled = true

        #if os(iOS)
        let format = setFormatForDevice()
        AudioKit.engine.attach(self.avAudioNode)
