Instance Method

setPreferredPolarPattern(_:)

Selects the preferred directivity configuration for the data source.

Declaration

func setPreferredPolarPattern(_ pattern: AVAudioSession.PolarPattern?) throws

Parameters

pattern

The directivity configuration to be used.

Return Value

true if a request was successfully made, or false otherwise.

Discussion

Requests a change to the selected polar pattern; to determine whether the change takes effect, use the selectedPolarPattern property.

If the data source and its owning port are in use, using this method to change the directivity configuration will likely result in a route reconfiguration.

Set a preferred polar pattern only after setting the audio session’s category and mode and activating the session.

See Also

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.