         let attemptRestart = {
             if AKSettings.enableRouteChangeHandling, shouldBeRunning, !engine.isRunning {
                 do {
-                    #if !os(macOS)
+                    #if os(iOS)
                     let appIsNotActive = UIApplication.shared.applicationState != .active
                     let appDoesNotSupportBackgroundAudio = !AKSettings.appSupportsBackgroundAudio
 

                }

                if AKSettings.enableCategoryChangeHandling, !engine.isRunning, shouldBeRunning {
                    #if !os(macOS)
                    let appIsNotActive = UIApplication.shared.applicationState != .active
                    let appDoesNotSupportBackgroundAudio = !AKSettings.appSupportsBackgroundAudio


import Foundation

extension AKManager {
    /// Start up the audio engine with periodic functions
    public static func start(withPeriodicFunctions functions: AKPeriodicFunction...) throws {
        // ensure that an output has been set previously
