A structure that defines the available input and output port types.


struct Port



static let HDMI: AVAudioSession.Port

Output to a device using the High-Definition Multimedia Interface (HDMI) specification.

static let airPlay: AVAudioSession.Port

Output to a remote device over AirPlay.

static let bluetoothA2DP: AVAudioSession.Port

Output to a Bluetooth A2DP device.

static let bluetoothHFP: AVAudioSession.Port

Input or output on a Bluetooth Hands-Free Profile device.

static let bluetoothLE: AVAudioSession.Port

Output to a Bluetooth Low Energy (LE) peripheral.

static let builtInMic: AVAudioSession.Port

The built-in microphone on a device.

static let builtInReceiver: AVAudioSession.Port

The speaker you hold to your ear when you’re on a phone call.

static let builtInSpeaker: AVAudioSession.Port

Output to the device’s built-in speaker.

static let carAudio: AVAudioSession.Port

Input or output through Car Audio.

static let headsetMic: AVAudioSession.Port

A wired headset’s built-in microphone.

static let lineIn: AVAudioSession.Port

Line-level input from the dock connector.

static let lineOut: AVAudioSession.Port

Line-level output to the dock connector.

static let usbAudio: AVAudioSession.Port

Input or output on a Universal Serial Bus device.


See Also

Getting the Port Attributes

var portName: String

A descriptive name for the port.

var channels: [AVAudioSessionChannelDescription]?

An array of channel objects that describe the port’s input or output channels.

class AVAudioSessionChannelDescription

A class that describes a hardware channel on the current device.

var uid: String

A system-assigned unique identifier (UID) for the port.

var hasHardwareVoiceCallProcessing: Bool

A Boolean value that indicates whether the associated hardware port has built-in processing for two-way voice communication.