Contents

overrideMutedMicrophoneInterruption

An option that indicates whether the system interrupts the audio session when it mutes the built-in microphone.

Declaration

static var overrideMutedMicrophoneInterruption: AVAudioSession.CategoryOptions { get }

Mentioned in

Discussion

Some devices include a privacy feature that mutes the built-in microphone at the hardware level in certain conditions, such as when you close the Smart Folio cover of an iPad. When this occurs, the system interrupts the audio session that’s capturing input from the microphone. Attempting to start audio input after the system mutes the microphone results in an error.

If your app uses an audio session category that supports input and output, such as playAndRecord, you can set this option to disable the default behavior and continue using the session. Disabling the default behavior may be useful to allow your app to continue playback when recording or monitoring a muted microphone doesn’t lead to a poor user experience. When you set this option, playback continues as normal, and the microphone hardware produces sample buffers, but with values of 0.

See Also

Category options