isSpatialAudioEnabled
A Boolean value that indicates whether the port supports spatial audio playback.
Declaration
var isSpatialAudioEnabled: Bool { get }Discussion
This property is only relevant in the context of ports that have a small number of hardware channels (typically 2), but have enhanced capabilities for playing multichannel content.
When you create a “Now Playing” app, inform the system if the app supports multichannel audio content by using setSupportsMultichannelContent(_:). To detect changes in user preferences that affect spatial audio playback, register to receive the notification by using spatialPlaybackCapabilitiesChangedNotification.
Some port types — like USB and HDMI — may support multichannel playback because they have hardware formats supporting more than 2 channels. For example, many HDMI receivers connect to many speakers and are capable of rendering 5.1, 7.1, or other popular surround sound formats. Use setPreferredOutputNumberOfChannels(_:) to set the preferred number of hardware channels, and query the number of channels by using maximumOutputNumberOfChannels.
For more information about “Now Playing” apps, see Becoming a now playable app.