Protocol

AVAudio​Session​Delegate

The use of this protocol is deprecated in iOS 6 and later. Instead, you should use the notifications declared in AVAudio​Session.

Overview

The delegate of an AVAudio​Session object must adopt the AVAudio​Session​Delegate protocol. The methods in this protocol are optional. They allow a delegate to respond to the following sorts of changes in state:

  • Changes to the availability of audio input

  • Audio session interruption, or end of audio session interruption

An AVAudio​Session delegate can respond to interruptions at the audio session level. You can use this interface along with any iOS audio technology. For example, your AVAudio​Session delegate can handle interruptions for OpenAL and audio unit playback.

When using the AV Foundation framework for recording or playback, you can also respond to interruptions at the individual recorder or player level. To do this, create audio recorder or audio player delegates using the protocols described in AVAudio​Recorder​Delegate and AVAudio​Player​Delegate.

Symbols

Delegate Methods

func begin​Interruption()

Called after your audio session is interrupted.

func end​Interruption()

Called after your audio session interruption ends.

func end​Interruption(with​Flags:​ Int)

Called after your audio session interruption ends, with flags indicating the state of the audio session.

func input​Is​Available​Changed(Bool)

Called after the availability of audio input changes on a device.

Relationships

Inherits From