Class

AVAudioSessionDataSourceDescription

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

Declaration

@interface 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 doesn’t 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 system makes the device more sensitive to audio signals from a particular direction. See Data Source Polar Patterns for more information.

Topics

Identifying a Data Source

dataSourceID

The system-assigned identifier for the data source.

dataSourceName

A human-readable name for the data source.

Retrieving the Data Source Location

location

The location of the data source on the device.

AVAudioSessionLocation

Constants that describe the location of the data source on device.

Data Source Locations

These values represent the available locations for an audio session data source.

Retrieving the Data Source Orientation

orientation

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

AVAudioSessionOrientation

Constants that describe the orientation or directionality of the data source on an iOS device.

Data Source Orientations

These values indicate the directions in which a data source can point, relative to the device’s natural orientation.

Configuring Microphone Directivity

selectedPolarPattern

The directivity configuration currently in use by the data source.

supportedPolarPatterns

The set of directivity configurations supported by the data source.

preferredPolarPattern

The preferred directivity configuration for the data source.

- setPreferredPolarPattern:error:

Selects the preferred directivity configuration for the data source.

AVAudioSessionPolarPattern

Constants that describe the possible polar patterns of the data source on an iOS device.

Data Source Polar Patterns

These values represent a data source’s available polar patterns.

Relationships

Inherits From

See Also

Working with Audio Routes

currentRoute

A description of the current audio route’s input and output ports.

AVAudioSessionRouteDescription

An object that describes the input and output ports associated with a session’s audio route.

inputAvailable

A Boolean value that indicates whether an audio input path is available.

availableInputs

An array of input ports available for audio routing.

preferredInput

The preferred input port for audio routing.

- setPreferredInput:error:

Sets the preferred input port for audio routing.

AVAudioSessionPortDescription

Information about the capabilities of the port and the hardware channels it supports.

inputDataSource

The currently selected input data source.

inputDataSources

An array of available data sources for the audio session’s current input port.

- setInputDataSource:error:

Selects a data source for the audio session’s current input port.

outputDataSources

An array of available output data sources for the current audio route.

outputDataSource

The currently selected output data source.

- setOutputDataSource:error:

Sets the output data source for an audio session.

- overrideOutputAudioPort:error:

Temporarily changes the current audio route.

inputIsAvailable

A Boolean value that indicates whether a hardware audio input path is available.

Deprecated