setActive(_:withFlags:)
Activates or deactivates your app’s audio session; provides flags for use by other audio sessions.
Declaration
func setActive(_ active: Bool, withFlags flags: Int) throwsParameters
Discussion
If another app’s active audio session has higher priority than your app, and that other audio session doesn’t allow mixing with other apps, attempting to activate your audio session might fail.