Type Alias

AVAudioSessionCategory

Audio session category identifiers.

Declaration

typedef NSString *AVAudioSessionCategory;

Discussion

An audio session category defines a set of audio behaviors. The operating system sets the precise behaviors associated with each category, and Apple may refine category behavior in future versions of the operating system. Choose the category that most accurately describes the audio behavior you want.

You can refine the configuration provided by the AVAudioSessionCategoryPlayback, AVAudioSessionCategoryRecord, and AVAudioSessionCategoryPlayAndRecord categories by using an audio session mode, as described in AVAudioSessionMode.

Supporting AirPlay

The audio session playback-only categories (AVAudioSessionCategoryAmbient, AVAudioSessionCategorySoloAmbient, and AVAudioSessionCategoryPlayback) support both the mirrored and nonmirrored variants of AirPlay.

The audio session category AVAudioSessionCategoryPlayAndRecord supports only the mirrored variant of AirPlay, while the AVAudioSessionCategoryRecord and AVAudioSessionCategoryMultiRoute categories don’t allow routing to AirPlay.

Topics

Audio Session Categories

AVAudioSessionCategoryAmbient

The category for an app in which sound playback is nonprimary—that is, your app also works with the sound turned off.

AVAudioSessionCategoryMultiRoute

The category for routing distinct streams of audio data to different output devices at the same time.

AVAudioSessionCategoryPlayAndRecord

The category for recording (input) and playback (output) of audio, such as for a Voice over Internet Protocol (VoIP) app.

AVAudioSessionCategoryPlayback

The category for playing recorded music or other sounds that are central to the successful use of your app.

AVAudioSessionCategoryRecord

The category for recording audio; this category silences playback audio.

AVAudioSessionCategorySoloAmbient

The default audio session category.

AVAudioSessionCategoryAudioProcessing

The category for using an audio hardware codec or signal processor while not playing or recording audio.

Deprecated

See Also

Configuring the Audio Session

category

The current audio session category.

- setCategory:error:

Sets the audio session’s category.

availableCategories

The audio session categories available on the current device.

categoryOptions

The set of options associated with the current audio session category.

- setCategory:withOptions:error:

Sets the audio session’s category with the specified options.

AVAudioSessionCategoryOptions

Constants that specify optional audio behaviors.

mode

The current audio session’s mode.

- setMode:error:

Sets the audio session’s mode.

- setCategory:mode:options:error:

Sets the audio session’s category, mode, and options.

availableModes

The audio session modes available on the device.

AVAudioSessionMode

Audio session mode identifiers.

routeSharingPolicy

The current route-sharing policy.

- setCategory:mode:routeSharingPolicy:options:error:

Sets the session category, mode, route-sharing policy, and options.

AVAudioSessionRouteSharingPolicy

Cases that indicate the possible route-sharing policies for an audio session.