native_audio_session_manager.h
Overview
The native_audio_session_manager.h file declares the functions related to an audio session manager.
You can call the functions to create an audio session manager, activates or deactivates an audio session, checks whether an audio session is activated, and listens for audio session deactivation events.
Library: libohaudio.so
File to include: <ohaudio/native_audio_session_manager.h>
System capability: SystemCapability.Multimedia.Audio.Core
Since: 12
Related module: OHAudio
Summary
Structs
| Name | Description |
|---|---|
| struct OH_AudioSession_Strategy | Describes the audio session strategy. |
| struct OH_AudioSession_DeactivatedEvent | Describes the event indicating that an audio session is deactivated. |
Types
| Name | Description |
|---|---|
| typedef struct OH_AudioSessionManager OH_AudioSessionManager | Defines a struct for the audio session manager. |
| typedef struct OH_AudioSession_Strategy OH_AudioSession_Strategy | Defines a struct for the audio session strategy. |
| typedef struct OH_AudioSession_DeactivatedEvent OH_AudioSession_DeactivatedEvent | Defines a struct for the event indicating that an audio session is deactivated. |
| typedef int32_t (*OH_AudioSession_DeactivatedCallback)(OH_AudioSession_DeactivatedEvent event) | Defines a function pointer to the callback function used to listen for audio session deactivation events. |
Enums
| Name | Description |
|---|---|
| OH_AudioSession_ConcurrencyMode { CONCURRENCY_DEFAULT = 0, CONCURRENCY_MIX_WITH_OTHERS = 1, CONCURRENCY_DUCK_OTHERS = 2, CONCURRENCY_PAUSE_OTHERS = 3 } |
Enumerates the audio concurrency modes. |
| OH_AudioSession_DeactivatedReason { DEACTIVATED_LOWER_PRIORITY = 0, DEACTIVATED_TIMEOUT = 1 } |
Enumerates the reasons for deactivating an audio session. |