Contents

kAudioSessionProperty_OverrideAudioRoute

Specifies whether or not to override the audio session category’s typical audio route.

Declaration

var kAudioSessionProperty_OverrideAudioRoute: Int { get }

Discussion

A write-only UInt32 value. Can be set with one of two values: kAudioSessionOverrideAudioRoute_None, which specifies that you want to use the typical audio route; and kAudioSessionOverrideAudioRoute_Speaker, when sends output audio to the built-in speaker. This property can be used only with the kAudioSessionCategory_PlayAndRecord (or the equivalent playAndRecord) category.

If a headset is plugged in at the time you set this property’s value to kAudioSessionOverrideAudioRoute_Speaker, the system changes the audio routing for input as well as for output: input comes from the built-in microphone; output goes to the built-in speaker.

Upon an audio route change (such as by plugging in or unplugging a headset), or upon interruption, this property reverts to its default value.

See also kAudioSessionProperty_OverrideCategoryDefaultToSpeaker.

See Also

Constants