Class

AVAudioSessionDataSourceDescription

A data source description 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.)

Topics

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

See Also

Supporting Types

protocol AVAudioSessionDelegate

The use of this protocol is deprecated in iOS 6 and later. Instead, you should use the notifications declared in AVAudioSession.

class AVAudioSessionChannelDescription

A channel description provides descriptive information about a hardware channel on the current device.

class AVAudioSessionPortDescription

A port description object describes a single input or output port associated with an audio route. You can use the information in this class to obtain information about the capabilities of the port and the hardware channels it supports.

class AVAudioSessionRouteDescription

A route description manages the input and output ports associated with the current audio route for a session.