 #if !os(tvOS)
 import CoreAudioKit
 #endif
+#if os(iOS)
+import CoreTelephony
+#endif
 
 import Dispatch
 

            engine.connect(finalMixer.avAudioNode, to: engine.outputNode)
        }
    }

    // MARK: - Device Management


    // Restarts the engine after audio output has been changed, like headphones plugged in.
    @objc fileprivate static func restartEngineAfterRouteChange(_ notification: Notification) {
        DispatchQueue.main.async {
            if !microphoneLocked && shouldBeRunning && !engine.isRunning {
                do {
                    try self.engine.start()
                    // Sends notification after restarting the engine, so it is safe to resume
