Class

AVAudioSessionDataSourceDescription

A description that defines a data source for an audio input or output, giving information such as the source’s name, location and orientation.

Declaration

class AVAudioSessionDataSourceDescription : NSObject

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: AVAudioSession.Location?

The location of the data source on the device.

var orientation: AVAudioSession.Orientation?

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

Configuring Microphone Directivity

var selectedPolarPattern: AVAudioSession.PolarPattern?

The directivity configuration currently in use by the data source.

var supportedPolarPatterns: [AVAudioSession.PolarPattern]?

The set of directivity configurations supported by the data source.

var preferredPolarPattern: AVAudioSession.PolarPattern?

The preferred directivity configuration for the data source.

func setPreferredPolarPattern(AVAudioSession.PolarPattern?)

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

These values indicate the directions in which a data source can point, 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

class AVAudioSessionChannelDescription

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

class AVAudioSessionPortDescription

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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software