Function

AudioSessionSetActive

Actives or deactivates your application’s audio session.

Declaration

OSStatus AudioSessionSetActive(Boolean active);

Parameters

active

Pass true to activate your application’s audio session, or false to deactivate it.

Return Value

A result code. See Result Codes.

Discussion

Activating your audio session may interrupt audio sessions belonging to other applications running in the background, depending on categories and priorities. Deactivating your audio session allows other, interrupted audio sessions to resume.

When another active audio session does not allow mixing, attempting to activate your audio session may fail.

See Also

Initializing and Activating an Audio Session

AudioSessionInitialize

Initializes an iOS application’s audio session object.

Deprecated
AudioSessionSetActiveWithFlags

Activates or deactivates your application’s audio session; provides flags for use by other audio sessions.

Deprecated