     // MARK: - Route Change Response
 
     // Restarts the engine after audio output has been changed, like headphones plugged in.
-    @objc fileprivate static func restartEngineAfterRouteChange(_ notification: Notification) {
+    fileprivate static func restartEngineAfterRouteChange(_ notification: Notification) {
         // Notifications aren't guaranteed to come in on the main thread
 
         let attemptRestart = {


    /// Observes changes to AVAudioEngineConfigurationChange..
    private static var configChangeObserver: Any?

    /// Start up the audio engine with periodic functions
    public static func start(withPeriodicFunctions functions: AKPeriodicFunction...) throws {


        // Subscribe to route changes that may affect our engine
        // Automatic handling of this change can be disabled via AKSettings.enableRouteChangeHandling
        routeChangeObserver = NotificationCenter.default.addObserver(forName: AVAudioSession.routeChangeNotification,
                                                                     object: nil,
                                                                     queue: OperationQueue.main,
                                                                     using: { (notification) in
            restartEngineAfterRouteChange(notification)
        })
        #endif

        // Subscribe to session/configuration changes to our engine
        // Automatic handling of this change can be disabled via AKSettings.enableConfigurationChangeHandling
        configChangeObserver = NotificationCenter.default.addObserver(forName: .AVAudioEngineConfigurationChange,
