Class

AVAudioSessionDataSourceDescription

The AVAudioSessionDataSourceDescription class defines a data source for an audio input or output, providing information such as the source’s name, location and orientation.

Overview

You obtain data source descriptions from the shared AVAudioSession object or the AVAudioSessionPortDescription objects corresponding to its input and output ports. Only built-in microphone ports on certain devices support the location, orientation, and polar pattern properties; if a port does not support these features, the value of its dataSources property is nil.

This class is especially useful for differentiating between microphone configurations on devices having more than one built-in microphone. Such devices may also support signal processing features for spatial filtering, or beamforming, in which the device is made more sensitive to audio signals from a particular direction. (See Data Source Polar Patterns.)

Symbols

Getting Data Source Information

var dataSourceID: NSNumber

The system-assigned identifier for the data source.

var dataSourceName: String

A human-readable name for the data source.

var location: String?

The location of the data source on the device.

var orientation: String?

The orientation of the data source relative to the device’s natural orientation.

Configuring Microphone Directivity

var selectedPolarPattern: String?

The directivity configuration currently in use by the data source.

var supportedPolarPatterns: [String]?

The set of directivity configurations supported by the data source.

var preferredPolarPattern: String?

The preferred directivity configuration for the data source.

func setPreferredPolarPattern(String?)

Selects the preferred directivity configuration for the data source.

Constants

Data Source Locations

The location of a data source on a device, relative to the device’s natural orientation.

Data Source Orientations

The direction in which a data source points, relative to the device’s natural orientation.

Data Source Polar Patterns

Constants that describe options for microphone directivity.

Relationships

Inherits From

Conforms To