Structure

AVAudioSession.Mode

Audio session mode identifiers.

Declaration

struct Mode

Overview

While categories set the base behaviors for your app, you use modes to assign specialized behavior to an audio session category.

Topics

Audio Session Modes

static let `default`: AVAudioSession.Mode

The default audio session mode.

static let gameChat: AVAudioSession.Mode

A mode that the GameKit framework sets on behalf of an application that uses GameKit’s voice chat service.

static let measurement: AVAudioSession.Mode

A mode that indicates that your app is performing measurement of audio input or output.

static let moviePlayback: AVAudioSession.Mode

A mode that indicates that your app is playing back movie content.

static let spokenAudio: AVAudioSession.Mode

A mode used for continuous spoken audio to pause the audio when another app plays a short audio prompt.

static let videoChat: AVAudioSession.Mode

A mode that indicates that your app is engaging in online video conferencing.

static let videoRecording: AVAudioSession.Mode

A mode that indicates that your app is recording a movie.

static let voiceChat: AVAudioSession.Mode

A mode that indicates that your app is performing two-way voice communication, such as using Voice over Internet Protocol (VoIP).

static let voicePrompt: AVAudioSession.Mode

A mode that indicates that your app plays audio using text-to-speech.

Relationships

See Also

Configuring the Audio Session

var category: AVAudioSession.Category

The current audio session category.

func setCategory(AVAudioSession.Category)

Sets the audio session’s category.

var availableCategories: [AVAudioSession.Category]

The audio session categories available on the current device.

struct AVAudioSession.Category

Audio session category identifiers.

var categoryOptions: AVAudioSession.CategoryOptions

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

func setCategory(AVAudioSession.Category, options: AVAudioSession.CategoryOptions)

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

struct AVAudioSession.CategoryOptions

Constants that specify optional audio behaviors.

var mode: AVAudioSession.Mode

The current audio session’s mode.

func setMode(AVAudioSession.Mode)

Sets the audio session’s mode.

var availableModes: [AVAudioSession.Mode]

The audio session modes available on the device.

enum AVAudioSession.RouteSharingPolicy

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