Global Variable

AVAudioSessionRouteChangeNotification

A notification that’s posted when the system’s audio route changes.

Declaration

const NSNotificationName AVAudioSessionRouteChangeNotification;

Discussion

The userInfo dictionary of this notification contains the AVAudioSessionRouteChangeReasonKey and AVAudioSessionRouteChangePreviousRouteKey keys, which provide information about the route change.

See Responding to Audio Session Route Changes for more information on using this notification.

The system posts this notification on a secondary thread.

Topics

User Info Keys

AVAudioSessionRouteChangeReasonKey

A user info key that’s used to retrieve the route change reason.

AVAudioSessionRouteChangePreviousRouteKey

A user info key that’s used to retrieve the previously active audio session route.

User Info Values

AVAudioSessionRouteChangeReason

Constants that indicate the reason for an audio route change.

See Also

Responding to Audio Session Notifications

Responding to Audio Session Interruptions

Observe audio session notifications to ensure that your app responds appropriately to interruptions.

Responding to Audio Session Route Changes

Observe audio session notifications to ensure that your app responds appropriately to route changes.

AVAudioSessionInterruptionNotification

A notification that’s posted when an audio interruption occurs.

Interruption Flags

Constants that indicate the state of the audio session following an interruption.

AVAudioSessionSilenceSecondaryAudioHintNotification

A notification that’s posted when the primary audio from other applications starts and stops.

AVAudioSessionMediaServicesWereLostNotification

A notification that’s posted when the system terminates the media server.

AVAudioSessionMediaServicesWereResetNotification

A notification that’s posted when the media server restarts.