Global Variable

AVAudioSessionCategoryRecord

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

Declaration

const AVAudioSessionCategory AVAudioSessionCategoryRecord;

Discussion

This category has the effect of silencing virtually all output on the system, for as long as the session is active. Unless you need to prevent any unexpected sounds from being played, use AVAudioSessionCategoryPlayAndRecord instead.

To continue recording audio when your app transitions to the background (for example, when the screen locks), add the audio value to the UIBackgroundModes key in your information property list file.

The user must grant permission for audio recording.

See Also

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.

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