Dunfey · Hotel WWDC as data, est. 1983
Front desk everything
Years
Topics

2021 Audio & Video

WWDC21 · 18 min · Audio & Video

Immerse your app in Spatial Audio

Discover how spatial audio can help you provide a theater-like experience for media in your apps and on the web. We’ll show you how you can easily bring immersive audio to those listening with compatible hardware, and how to automatically deliver different listening experiences depending on someone’s bandwidth or connection — all with little to no change to your code. And gain recommendations on how you can tailor the experience in your app and use spatial audio to tell stories in new, exciting ways.

Watch at developer.apple.com ↗

Transcript all transcripts

Code shown on screen · 5 snippets

Spatialization Formats swift · at 6:55 ↗
public struct AVAudioSpatializationFormats : OptionSet {

    public init(rawValue: UInt)

    
    public static var monoAndStereo: AVAudioSpatializationFormats { get }

    public static var multichannel: AVAudioSpatializationFormats { get }

    public static var monoStereoAndMultichannel: AVAudioSpatializationFormats { get }
}
AVPlayerItem and AVSampleBufferAudioRenderer swift · at 7:21 ↗
@available(macOS 11.0, *)
var allowedAudioSpatializationFormats: Int32
Spatial audio availability swift · at 8:21 ↗
@available(iOS 6.0, *)
class AVAudioSessionPortDescription : NSObject {

  @available(iOS 15.0, *)
  var isSpatialAudioEnabled: Bool { get }

 }
Spatial audio availability swift · at 8:35 ↗
extension AVAudioSession {
  @available(iOS 15.0, *)
  class let spatialPlaybackCapabilitiesChangedNotification: NSNotification.Name
}

@available(iOS 15.0, *)
let AVAudioSessionSpatialAudioEnabledKey: String
Control center integration swift · at 9:01 ↗
extension AVAudioSession {
  @available(iOS 15.0, *)
  func setSupportsMultichannelContent(_ inValue: Bool) throws
  @available(iOS 15.0, *)
  var supportsMultichannelContent: Bool { get }
}

Resources