         outputs.filter({$0.portType == .headphones}).isNotEmpty
     }
 }
-
-// MARK: - AVAudioEngine
-
-extension AVAudioEngine {
-    func detachAll() {
-        attachedNodes.forEach {
-            detach($0)
-        }
-    }
-}

            return false
        }
        
        engine.stop()
        
        return !engine.isRunning

            switch reason {
            case .newDeviceAvailable:
                if AVAudioSession.sharedInstance().currentRoute.hasHeadphonens {
                }

            case .oldDeviceUnavailable:
                if let previousRoute = userInfo[AVAudioSessionRouteChangePreviousRouteKey] as? AVAudioSessionRouteDescription,
                   !previousRoute.hasHeadphonens {
                }

            default:
