     }
 
     #if os(macOS)
-        /// Enumerate the list of available devices.
-        @objc public static var devices: [AKDevice]? {
-            EZAudioUtilities.setShouldExitOnCheckResultFail(false)
-            return EZAudioDevice.devices().map { AKDevice(ezAudioDevice: $0 as! EZAudioDevice) }
-        }
+    /// Enumerate the list of available devices.
+    @objc public static var devices: [AKDevice]? {
+        EZAudioUtilities.setShouldExitOnCheckResultFail(false)
+        return EZAudioDevice.devices().map { AKDevice(ezAudioDevice: $0 as! EZAudioDevice) }
+    }
     #endif
 
     /// Enumerate the list of available input devices.
     @objc public static var inputDevices: [AKDevice]? {
         #if os(macOS)
-            EZAudioUtilities.setShouldExitOnCheckResultFail(false)
-            return EZAudioDevice.inputDevices().map { AKDevice(ezAudioDevice: $0 as! EZAudioDevice) }
-        #else
-            var returnDevices = [AKDevice]()
-            if let devices = AVAudioSession.sharedInstance().availableInputs {
-                for device in devices {
-                    if device.dataSources == nil || device.dataSources!.isEmpty {
-                        returnDevices.append(AKDevice(portDescription: device))
-                    } else {
-                        for dataSource in device.dataSources! {
-                            returnDevices.append(AKDevice(name: device.portName,
-                                                          deviceID: "\(device.uid) \(dataSource.dataSourceName)"))
-                        }
+        EZAudioUtilities.setShouldExitOnCheckResultFail(false)
+        return EZAudioDevice.inputDevices().map { AKDevice(ezAudioDevice: $0 as! EZAudioDevice) }
+        #else
+        var returnDevices = [AKDevice]()
+        if let devices = AVAudioSession.sharedInstance().availableInputs {
+            for device in devices {
+                if device.dataSources == nil || device.dataSources!.isEmpty {
+                    returnDevices.append(AKDevice(portDescription: device))
+                } else {
+                    for dataSource in device.dataSources! {
+                        returnDevices.append(AKDevice(name: device.portName,
+                                                      deviceID: "\(device.uid) \(dataSource.dataSourceName)"))
                     }
                 }
-                return returnDevices
-            }
-            return nil
+            }
+            return returnDevices
+        }
+        return nil
         #endif
     }
 
     /// Enumerate the list of available output devices.
     @objc public static var outputDevices: [AKDevice]? {
         #if os(macOS)
-            EZAudioUtilities.setShouldExitOnCheckResultFail(false)
-            return EZAudioDevice.outputDevices().map { AKDevice(ezAudioDevice: $0 as! EZAudioDevice) }
-        #else
-            let devs = AVAudioSession.sharedInstance().currentRoute.outputs
-            if devs.isNotEmpty {
-                var outs = [AKDevice]()
-                for dev in devs {
-                    outs.append(AKDevice(name: dev.portName, deviceID: dev.uid))
-                }
-                return outs
-            }
-            return nil
+        EZAudioUtilities.setShouldExitOnCheckResultFail(false)
+        return EZAudioDevice.outputDevices().map { AKDevice(ezAudioDevice: $0 as! EZAudioDevice) }
+        #else
+        let devs = AVAudioSession.sharedInstance().currentRoute.outputs
+        if devs.isNotEmpty {
+            var outs = [AKDevice]()
+            for dev in devs {
+                outs.append(AKDevice(name: dev.portName, deviceID: dev.uid))
+            }
+            return outs
+        }
+        return nil
         #endif
     }
 
     /// The name of the current input device, if available.
     @objc public static var inputDevice: AKDevice? {
         #if os(macOS)
-            if let dev = EZAudioDevice.currentInput() {
-                return AKDevice(name: dev.name, deviceID: dev.deviceID)
-            }
-        #else
-            if let portDescription = AVAudioSession.sharedInstance().preferredInput {
-                return AKDevice(portDescription: portDescription)
-            } else {
-                let inputDevices = AVAudioSession.sharedInstance().currentRoute.inputs
-                if inputDevices.isNotEmpty {
-                    for device in inputDevices {
-                        return AKDevice(portDescription: device)
-                    }
+        if let dev = EZAudioDevice.currentInput() {
+            return AKDevice(name: dev.name, deviceID: dev.deviceID)
+        }
+        #else
+        if let portDescription = AVAudioSession.sharedInstance().preferredInput {
+            return AKDevice(portDescription: portDescription)
+        } else {
+            let inputDevices = AVAudioSession.sharedInstance().currentRoute.inputs
+            if inputDevices.isNotEmpty {
+                for device in inputDevices {
+                    return AKDevice(portDescription: device)
                 }
             }
+        }
         #endif
         return nil
     }

    @objc public static var engine: AVAudioEngine {
        get {
            // Access a few attributes immediately so things are initialized properly
            _ = _engine.inputNode
            _ = AudioKit.deviceSampleRate
            return _engine
        }

//

#if !os(tvOS)
import CoreAudioKit
#endif

#if !os(macOS)
import UIKit
#endif
import Dispatch

