     @objc static var shouldBeRunning = false
 
     @objc static var finalMixer = AKMixer()
+
+    /// Notification observers
+    fileprivate static var notificationObservers: [Any] = []
 
     /// An audio output operation that most applications will need to use last
     @objc open static var output: AKNode? {

        // Stop the engine.
        engine.stop()
        shouldBeRunning = false
        #if os(iOS)
        do {
            try AVAudioSession.sharedInstance().setActive(false)

        #if os(iOS)

            if AKSettings.enableRouteChangeHandling {

                let routeChangeObserver = NotificationCenter.default.addObserver(forName: .AVAudioSessionRouteChange,
                                                                                 object: nil,
                                                                                 queue: OperationQueue.main,
                                                                                 using: { (notification) in
                                                                                    AudioKit.restartEngineAfterRouteChange(notification)
                })
                notificationObservers.append(routeChangeObserver)

            }

            if AKSettings.enableCategoryChangeHandling {
                let configurationChangeObserver = NotificationCenter.default.addObserver(forName: .AVAudioEngineConfigurationChange,
                                                                                         object: engine,
                                                                                         queue: OperationQueue.main,
                                                                                         using: { (notification) in
                                                                                            AudioKit.restartEngineAfterConfigurationChange(notification)
                })
                notificationObservers.append(configurationChangeObserver)
            }
            try updateSessionCategoryAndOptions()
            try AVAudioSession.sharedInstance().setActive(true)
