openharmony 鸿蒙 capi-native-audio-session-manager-h

2026-08-25 浏览 (1)

native_audio_session_manager.h

Overview

The file declares the functions related to an audio session manager.
You can call the functions to create an audio session manager, activate or deactivate an audio session, check whether an audio session is activated, and listen for audio session deactivation events.

File to include: <ohaudio/native_audio_session_manager.h>

Library: libohaudio.so

System capability: SystemCapability.Multimedia.Audio.Core

Since: 12

Related module: OHAudio

Summary

Structs

Nametypedef KeywordDescription
OH_AudioSession_DeactivatedEventOH_AudioSession_DeactivatedEventDescribes the event indicating that an audio session is deactivated.
OH_AudioSession_StateChangedEventOH_AudioSession_StateChangedEventDescribes the event indicating that the audio session state changes.
OH_AudioSessionManagerOH_AudioSessionManagerDescribes an audio session manager, which is used to manage audio sessions.

Enums

Nametypedef KeywordDescription
OH_AudioSession_SceneOH_AudioSession_SceneEnumerates the audio session scenes.
OH_AudioSession_StateChangeHintOH_AudioSession_StateChangeHintEnumerates the hints for audio session state changes.
OH_AudioSession_OutputDeviceChangeRecommendedActionOH_AudioSession_OutputDeviceChangeRecommendedActionEnumerates the recommended actions to take after an output device changes.
OH_AudioSession_DeactivatedReasonOH_AudioSession_DeactivatedReasonEnumerates the reasons for deactivating an audio session.
OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategoryOH_AudioSession_BluetoothAndNearlinkPreferredRecordCategoryEnumerates the preferred device categories available for recording with Bluetooth or NearLink.

Functions

Nametypedef KeywordDescription
typedef void (*OH_AudioSession_StateChangedCallback)(OH_AudioSession_StateChangedEvent event)OH_AudioSession_StateChangedCallbackDefines a function pointer to the callback used to listen for audio session state change events.
typedef void (*OH_AudioSession_AvailableDeviceChangedCallback)(OH_AudioDevice_ChangeType type, OH_AudioDeviceDescriptorArray *audioDeviceDescriptorArray)OH_AudioSession_AvailableDeviceChangedCallbackDefines a pointer to the callback that returns the changed audio device descriptor (possibly multiple descriptors).
typedef void (*OH_AudioSession_CurrentInputDeviceChangedCallback)(OH_AudioDeviceDescriptorArray *devices, OH_AudioStream_DeviceChangeReason changeReason)OH_AudioSession_CurrentInputDeviceChangedCallbackDefines a function pointer to the callback used to listen for the current input device change events.
typedef void (*OH_AudioSession_CurrentOutputDeviceChangedCallback)(OH_AudioDeviceDescriptorArray *devices, OH_AudioStream_DeviceChangeReason changeReason, OH_AudioSession_OutputDeviceChangeRecommendedAction recommendedAction)OH_AudioSession_CurrentOutputDeviceChangedCallbackDefines a function pointer to the callback used to listen for the current output device change events.
typedef int32_t (*OH_AudioSession_DeactivatedCallback)(OH_AudioSession_DeactivatedEvent event)OH_AudioSession_DeactivatedCallbackDefines a function pointer to the callback used to listen for audio session deactivation events.
OH_AudioCommon_Result OH_AudioManager_GetAudioSessionManager(OH_AudioSessionManager **audioSessionManager)-Obtains an OH_AudioSessionManager instance. Before using the features related to the audio session manager, you must obtain an OH_AudioSessionManager instance.
OH_AudioCommon_Result OH_AudioSessionManager_ActivateAudioSession(OH_AudioSessionManager *audioSessionManager, const OH_AudioSession_Strategy *strategy)-Activates an audio session.
OH_AudioCommon_Result OH_AudioSessionManager_DeactivateAudioSession(OH_AudioSessionManager *audioSessionManager)-Deactivates an audio session.
bool OH_AudioSessionManager_IsAudioSessionActivated(OH_AudioSessionManager *audioSessionManager)-Checks whether an audio session is activated.
OH_AudioCommon_Result OH_AudioSessionManager_RegisterSessionDeactivatedCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_DeactivatedCallback callback)-Registers a callback to listen for audio session deactivation events.
OH_AudioCommon_Result OH_AudioSessionManager_UnregisterSessionDeactivatedCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_DeactivatedCallback callback)-Unregisters the callback used to listen for audio session deactivation events.
OH_AudioCommon_Result OH_AudioSessionManager_SetScene(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_Scene scene)-Sets an audio session scene.
OH_AudioCommon_Result OH_AudioSessionManager_RegisterStateChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_StateChangedCallback callback)-Registers a callback to listen for audio session state change events.
OH_AudioCommon_Result OH_AudioSessionManager_UnregisterStateChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_StateChangedCallback callback)-Unregisters the callback used to listen for audio session state change events.
OH_AudioCommon_Result OH_AudioSessionManager_SetDefaultOutputDevice(OH_AudioSessionManager *audioSessionManager, OH_AudioDevice_Type deviceType)-Sets the default audio output device.
OH_AudioCommon_Result OH_AudioSessionManager_GetDefaultOutputDevice(OH_AudioSessionManager *audioSessionManager, OH_AudioDevice_Type *deviceType)-Obtains the default audio output device set by OH_AudioSessionManager_SetDefaultOutputDevice.
OH_AudioCommon_Result OH_AudioSessionManager_ReleaseDevices(OH_AudioSessionManager *audioSessionManager, OH_AudioDeviceDescriptorArray *audioDeviceDescriptorArray)-Releases audio devices available for an audio routing manager.
OH_AudioCommon_Result OH_AudioSessionManager_RegisterCurrentOutputDeviceChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_CurrentOutputDeviceChangedCallback callback)-Registers a callback to listen for the current output device change events.
OH_AudioCommon_Result OH_AudioSessionManager_UnregisterCurrentOutputDeviceChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_CurrentOutputDeviceChangedCallback callback)-Unregisters the callback used to listen for the current output device change events.
OH_AudioCommon_Result OH_AudioSessionManager_GetAvailableDevices(OH_AudioSessionManager *audioSessionManager, OH_AudioDevice_Usage deviceUsage, OH_AudioDeviceDescriptorArray **audioDeviceDescriptorArray)-Obtains the available audio devices.
OH_AudioCommon_Result OH_AudioSessionManager_RegisterAvailableDevicesChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioDevice_Usage deviceUsage, OH_AudioSession_AvailableDeviceChangedCallback callback)-Registers a callback to listen for available device change events.
OH_AudioCommon_Result OH_AudioSessionManager_UnregisterAvailableDevicesChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_AvailableDeviceChangedCallback callback)-Unregisters the callback used to listen for available device change events.
OH_AudioCommon_Result OH_AudioSessionManager_SelectMediaInputDevice(OH_AudioSessionManager *audioSessionManager, OH_AudioDeviceDescriptor *deviceDescriptor)-Selects a media input device. This function is not suitable for call recording, meaning it does not apply to situations where SourceType is SOURCE_TYPE_VOICE_COMMUNICATION.
When there is a concurrent recording stream with higher priority, the actual input device used by the application may differ from the one selected.
The application can use OH_AudioSessionManager_RegisterCurrentInputDeviceChangeCallback to register a callback to listen for the actual input device.
OH_AudioCommon_Result OH_AudioSessionManager_GetSelectedMediaInputDevice(OH_AudioSessionManager *audioSessionManager, OH_AudioDeviceDescriptor **audioDeviceDescriptor)-Obtains the media input device set by OH_AudioSessionManager_SelectMediaInputDevice.
OH_AudioCommon_Result OH_AudioSessionManager_SetBluetoothAndNearlinkPreferredRecordCategory(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory category)-Sets the preferred device category for recording with Bluetooth or NearLink. Applications can set this category before connecting to Bluetooth or NearLink devices, and the system prioritizes using the device for recording when the device is connected.
When there is a concurrent recording stream with higher priority, the actual input device used by the application may differ from the set preferred device.
The application can use OH_AudioSessionManager_RegisterCurrentInputDeviceChangeCallback to register a callback to listen for the actual input device.
OH_AudioCommon_Result OH_AudioSessionManager_GetBluetoothAndNearlinkPreferredRecordCategory(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory *category)-Obtains the preferred device category for recording with Bluetooth or NearLink.
OH_AudioCommon_Result OH_AudioSessionManager_RegisterCurrentInputDeviceChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_CurrentInputDeviceChangedCallback callback)-Registers a callback to listen for input device changes of an audio session manager.
OH_AudioCommon_Result OH_AudioSessionManager_UnregisterCurrentInputDeviceChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_CurrentInputDeviceChangedCallback callback)-Unregisters the callback used to listen for input device changes of an audio session manager.
OH_AudioCommon_Result OH_AudioSessionManager_ReleaseDevice(OH_AudioSessionManager *audioSessionManager, OH_AudioDeviceDescriptor *audioDeviceDescriptor)-Releases an audio device for an audio session manager.
OH_AudioCommon_Result OH_AudioSessionManager_EnableMuteSuggestionWhenMixWithOthers(OH_AudioSessionManager *audioSessionManager, bool enable)-Enables the function of receiving mute playback suggestion notifications during mixed playback.
bool OH_AudioSessionManager_IsOtherMediaPlaying(OH_AudioSessionManager *audioSessionManager)-Checks whether audio of the MUSIC, MOVIE, AUDIOBOOK, and GAME media types is being played by other applications. Activated audio sessions of the media types are also checked.
OH_AudioCommon_Result OH_AudioSessionManager_SetBehavior(OH_AudioSessionManager *audioSessionManager, uint32_t behavior)-Sets audio session behavior parameters. (Multiple flags can be combined.) If this API is called while an audio session is active, you must call the OH_AudioSessionManager_ActivateAudioSession API again for the settings to take effect.

Enum Description

OH_AudioSession_Scene

enum OH_AudioSession_Scene

Description

Enumerates the audio session scenes.

Since: 20

Enum ItemDescription
AUDIO_SESSION_SCENE_MEDIA = 0Media audio session.
AUDIO_SESSION_SCENE_GAME = 1Game audio session.
AUDIO_SESSION_SCENE_VOICE_COMMUNICATION = 2VoIP voice call audio session.

OH_AudioSession_StateChangeHint

enum OH_AudioSession_StateChangeHint

Description

Enumerates the hints for audio session state changes.

Since: 20

Enum ItemDescription
AUDIO_SESSION_STATE_CHANGE_HINT_RESUME = 0A hint is displayed, indicating that the audio session is resuming. The application can proactively trigger operations such as rendering.
AUDIO_SESSION_STATE_CHANGE_HINT_PAUSE = 1A hint is displayed, indicating that the audio session is paused and the audio focus is lost temporarily. When focus is regained, the AUDIO_SESSION_STATE_CHANGE_HINT_RESUME event is received.
AUDIO_SESSION_STATE_CHANGE_HINT_STOP = 2A hint is displayed, indicating that the audio session is stopped and the audio focus is lost permanently.
AUDIO_SESSION_STATE_CHANGE_HINT_TIME_OUT_STOP = 3A hint is displayed, indicating that the audio session is stopped by the system due to no activity, and the audio focus is lost.
AUDIO_SESSION_STATE_CHANGE_HINT_DUCK = 4A hint is displayed, indicating that audio ducking starts and the audio is played at a lower volume. If OH_AudioSessionManager_EnableMuteSuggestionWhenMixWithOthers is enabled, you can choose to mute the audio.
AUDIO_SESSION_STATE_CHANGE_HINT_UNDUCK = 5A hint is displayed, indicating that audio ducking ends and the audio is played at the normal volume. If OH_AudioSessionManager_EnableMuteSuggestionWhenMixWithOthers is enabled, you can unmute the audio.
AUDIO_SESSION_STATE_CHANGE_HINT_MUTE_SUGGESTION = 6Mute suggestion. When another application starts playing non-mixable audio, the application can determine whether to mute the audio.
Since: 23
AUDIO_SESSION_STATE_CHANGE_HINT_UNMUTE_SUGGESTION = 7Unmute suggestion. When the non-mixable audio of another application has finished playing, the application can decide whether to unmute the audio.
Since: 23
AUDIO_SESSION_STATE_CHANGE_HINT_MUTE = 8A hint is displayed, indicating that the audio session is muted. This hint is received only when the following conditions are met: The OH_AudioSessionManager_SetBehavior API is called to set OH_AudioSession_BehaviorFlags.MUTE_WHEN_INTERRUPTED, the OH_AudioSessionManager_SetScene API is called, and the audio session is activated.
Since: 24
AUDIO_SESSION_STATE_CHANGE_HINT_UNMUTE = 9A hint is displayed, indicating that the audio session is unmuted. This hint is received only when the following conditions are met: The OH_AudioSessionManager_SetBehavior API is called to set OH_AudioSession_BehaviorFlags.MUTE_WHEN_INTERRUPTED, the OH_AudioSessionManager_SetScene API is called, and the audio session is activated.
Since: 24

OH_AudioSession_OutputDeviceChangeRecommendedAction

enum OH_AudioSession_OutputDeviceChangeRecommendedAction

Description

Enumerates the recommended actions to take after an output device changes.

Common scenario example: switching between a headset and a loudspeaker device. Upon switching from the loudspeaker device to the headset upon wearing, the system suggests continuing playback and prompts that the application does not need to pause. Upon transitioning from the headset to the loudspeaker device upon removal, the system suggests suspending playback.

Since: 20

Enum ItemDescription
DEVICE_CHANGE_RECOMMEND_TO_CONTINUE = 0Suggests continuing playback. (This event serves as a playback maintenance indication, informing the application that audio playback does not need to stop during this device change. However, it must not be used as a criterion for triggering audio playback.)
DEVICE_CHANGE_RECOMMEND_TO_STOP = 1Suggests stopping playback.

OH_AudioSession_DeactivatedReason

enum OH_AudioSession_DeactivatedReason

Description

Enumerates the reasons for deactivating an audio session.

Since: 12

Enum ItemDescription
DEACTIVATED_LOWER_PRIORITY = 0The application focus is preempted.
DEACTIVATED_TIMEOUT = 1The application times out after the stream is stopped.

OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory

enum OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory

Description

Enumerates the preferred device categories available for recording with Bluetooth or NearLink.

Since: 21

Enum ItemDescription
PREFERRED_NONE = 0No specific device preference.
PREFERRED_DEFAULT = 1Prefers using Bluetooth or Nearlink devices for recording; whether to use low-latency or high-quality recording depends on the system.
PREFERRED_LOW_LATENCY = 2Prefers using Bluetooth or NearLink devices in low-latency mode for recording.
PREFERRED_HIGH_QUALITY = 3Prefers using Bluetooth or NearLink devices in high-quality mode for recording.

Function Description

OH_AudioSession_StateChangedCallback()

typedef void (*OH_AudioSession_StateChangedCallback)(OH_AudioSession_StateChangedEvent event)

Description

Defines a function pointer to the callback used to listen for audio session state change events.

Since: 20

Parameters

NameDescription
OH_AudioSession_StateChangedEvent eventEvent indicating that the audio session state changes.

OH_AudioSession_AvailableDeviceChangedCallback()

typedef void (*OH_AudioSession_AvailableDeviceChangedCallback)(OH_AudioDevice_ChangeType type, OH_AudioDeviceDescriptorArray *audioDeviceDescriptorArray)

Description

Defines a pointer to the callback that returns the changed audio device descriptor (possibly multiple descriptors).

Since: 21

Parameters

NameDescription
OH_AudioDevice_ChangeType typeDevice connection status, which can be connected or disconnected.
OH_AudioDeviceDescriptorArray *audioDeviceDescriptorArrayPointer to the audio device descriptors in the array.
If the pointer is no longer needed, use OH_AudioSessionManager_ReleaseDevices to release it.

OH_AudioSession_CurrentInputDeviceChangedCallback()

typedef void (*OH_AudioSession_CurrentInputDeviceChangedCallback)(OH_AudioDeviceDescriptorArray *devices, OH_AudioStream_DeviceChangeReason changeReason)

Description

Defines a function pointer to the callback used to listen for the current input device change events.

Since: 21

Parameters

NameDescription
OH_AudioDeviceDescriptorArray *devicesPointer to the audio device descriptors in the array.
Use OH_AudioSessionManager_ReleaseDevices to release the devices pointer if it is no longer needed.
OH_AudioStream_DeviceChangeReason changeReasonReason for the device change.

OH_AudioSession_CurrentOutputDeviceChangedCallback()

typedef void (*OH_AudioSession_CurrentOutputDeviceChangedCallback)(OH_AudioDeviceDescriptorArray *devices, OH_AudioStream_DeviceChangeReason changeReason, OH_AudioSession_OutputDeviceChangeRecommendedAction recommendedAction)

Description

Defines a function pointer to the callback used to listen for the current output device change events.

Since: 20

Parameters

NameDescription
OH_AudioDeviceDescriptorArray *devicesAudio device descriptor array, which points to OH_AudioDeviceDescriptorArray used to set the pointer variable of the audio device descriptor array. Do not release the audioDeviceDescriptorArray pointer separately. Instead, call OH_AudioSessionManager_ReleaseDevices to release the DeviceDescriptor array.
OH_AudioStream_DeviceChangeReason changeReasonPointer to OH_AudioStream_DeviceChangeReason, which is used to receive the device change reason.
OH_AudioSession_OutputDeviceChangeRecommendedAction recommendedActionPointer to OH_AudioSession_OutputDeviceChangeRecommendedAction, which is used to receive the recommended operation after the device change.

OH_AudioSession_DeactivatedCallback()

typedef int32_t (*OH_AudioSession_DeactivatedCallback)(OH_AudioSession_DeactivatedEvent event)

Description

Defines a function pointer to the callback used to listen for audio session deactivation events.

Since: 12

Parameters

NameDescription
OH_AudioSession_DeactivatedEvent eventEvent indicating that an audio session is deactivated.

OH_AudioManager_GetAudioSessionManager()

OH_AudioCommon_Result OH_AudioManager_GetAudioSessionManager(OH_AudioSessionManager **audioSessionManager)

Description

Obtains an OH_AudioSessionManager instance. Before using the features related to the audio session manager, you must obtain an OH_AudioSessionManager instance.

Since: 12

Parameters

NameDescription
OH_AudioSessionManager **audioSessionManagerDouble pointer to the OH_AudioSessionManager instance obtained.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: System error.

OH_AudioSessionManager_ActivateAudioSession()

OH_AudioCommon_Result OH_AudioSessionManager_ActivateAudioSession(OH_AudioSessionManager *audioSessionManager, const OH_AudioSession_Strategy *strategy)

Description

Activates an audio session.

Since: 12

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
const OH_AudioSession_Strategy *strategyPointer to an audio session strategy, which is an OH_AudioSession_Strategy struct.

Returns

TypeDescription
OH_AudioCommon_ResultOne of the following return values:
AUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The strategy parameter is invalid.
AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE: Invalid state.

OH_AudioSessionManager_DeactivateAudioSession()

OH_AudioCommon_Result OH_AudioSessionManager_DeactivateAudioSession(OH_AudioSessionManager *audioSessionManager)

Description

Deactivates an audio session.

Since: 12

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM: The audioSessionManager parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE: Invalid state.

OH_AudioSessionManager_IsAudioSessionActivated()

bool OH_AudioSessionManager_IsAudioSessionActivated(OH_AudioSessionManager *audioSessionManager)

Description

Checks whether an audio session is activated.

Since: 12

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.

Returns

TypeDescription
boolCheck result for whether the audio session is activated. true if activated, false otherwise.

OH_AudioSessionManager_RegisterSessionDeactivatedCallback()

OH_AudioCommon_Result OH_AudioSessionManager_RegisterSessionDeactivatedCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_DeactivatedCallback callback)

Description

Registers a callback to listen for audio session deactivation events.

Since: 12

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioSession_DeactivatedCallback callbackCallback used to receive the audio session deactivation event.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The callback parameter is nullptr.

OH_AudioSessionManager_UnregisterSessionDeactivatedCallback()

OH_AudioCommon_Result OH_AudioSessionManager_UnregisterSessionDeactivatedCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_DeactivatedCallback callback)

Description

Unregisters the callback used to listen for audio session deactivation events.

Since: 12

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioSession_DeactivatedCallback callbackCallback used to receive the audio session deactivation event.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The callback parameter is nullptr.

OH_AudioSessionManager_SetScene()

OH_AudioCommon_Result OH_AudioSessionManager_SetScene(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_Scene scene)

Description

Sets an audio session scene.

Since: 20

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioSession_Scene scenePointer to the audio session scene to be set by OH_AudioSession_Scene.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The scene parameter is set to a value outside the valid enumeration range.
AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE: The setting is not allowed in the current system state, for example, when the audio session is not ready.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_RegisterStateChangeCallback()

OH_AudioCommon_Result OH_AudioSessionManager_RegisterStateChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_StateChangedCallback callback)

Description

Registers a callback to listen for audio session state change events.

Since: 20

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioSession_StateChangedCallback callbackCallback used to receive the audio session state change event.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The callback parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_NO_MEMORY: Memory allocation fails.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_UnregisterStateChangeCallback()

OH_AudioCommon_Result OH_AudioSessionManager_UnregisterStateChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_StateChangedCallback callback)

Description

Unregisters the callback used to listen for audio session state change events.

Since: 20

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioSession_StateChangedCallback callbackCallback used to receive the audio session state change event.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The callback parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_SetDefaultOutputDevice()

OH_AudioCommon_Result OH_AudioSessionManager_SetDefaultOutputDevice(OH_AudioSessionManager *audioSessionManager, OH_AudioDevice_Type deviceType)

Description

Sets the default audio output device.

NOTE

  • This API is applicable to the following scenarios: If OH_AudioSession_Scene is set to VoIP, this API takes effect immediately after the audio session is activated. If OH_AudioSession_Scene is set to non-VoIP, this API does not take effect when the audio session is activated. It takes effect only when OH_AudioStream_Usage of the started playback is a voice message, VoIP voice call, or VoIP video call. Supported devices include the earpiece, speaker, and system default device.
  • This API can be called at any time after an OH_AudioSessionManager instance is created. The system records the device set by the application. However, the setting takes effect only after the AudioSession is activated. When the application starts playback, if an external device such as a Bluetooth or wired headset is connected, the system preferentially uses the external device to play sound. Otherwise, the system uses this default device to play sound.

Device behavior difference: If the default audio output device is set to earpiece on a device without an earpiece, the speaker will still be used for audio output.

Since: 20

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioDevice_Type deviceTypeDevice type. For details about the available options, see OH_AudioDevice_Type. The device types that can be set are as follows:
AUDIO_DEVICE_TYPE_EARPIECE: earpiece.
AUDIO_DEVICE_TYPE_SPEAKER: speaker.
AUDIO_DEVICE_TYPE_DEFAULT: system default device.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The deviceType parameter is out of the OH_AudioDevice_Type range.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_GetDefaultOutputDevice()

OH_AudioCommon_Result OH_AudioSessionManager_GetDefaultOutputDevice(OH_AudioSessionManager *audioSessionManager, OH_AudioDevice_Type *deviceType)

Description

Obtains the default audio output device set by OH_AudioSessionManager_SetDefaultOutputDevice.

Since: 20

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioDevice_Type *deviceTypePointer to the device type. For details about the available options, see OH_AudioDevice_Type. The returned device types are as follows:
AUDIO_DEVICE_TYPE_EARPIECE: earpiece.
AUDIO_DEVICE_TYPE_SPEAKER: speaker.
AUDIO_DEVICE_TYPE_DEFAULT: system default device.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The deviceType parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE: The default device type cannot be obtained in the current system state, for example, when the audio session is not ready.

OH_AudioSessionManager_ReleaseDevices()

OH_AudioCommon_Result OH_AudioSessionManager_ReleaseDevices(OH_AudioSessionManager *audioSessionManager, OH_AudioDeviceDescriptorArray *audioDeviceDescriptorArray)

Description

Releases audio devices available for an audio routing manager.

Since: 20

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioDeviceDescriptorArray *audioDeviceDescriptorArrayPointer to the audio device descriptors in the array to be released.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The audioDeviceDescriptorArray parameter is nullptr.

OH_AudioSessionManager_RegisterCurrentOutputDeviceChangeCallback()

OH_AudioCommon_Result OH_AudioSessionManager_RegisterCurrentOutputDeviceChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_CurrentOutputDeviceChangedCallback callback)

Description

Registers a callback to listen for the current output device change events.

Since: 20

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioSession_CurrentOutputDeviceChangedCallback callbackCallback used to return the audio device change information.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The callback parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_NO_MEMORY: Memory allocation fails.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_UnregisterCurrentOutputDeviceChangeCallback()

OH_AudioCommon_Result OH_AudioSessionManager_UnregisterCurrentOutputDeviceChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_CurrentOutputDeviceChangedCallback callback)

Description

Unregisters the callback used to listen for the current output device change events.

Since: 20

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioSession_CurrentOutputDeviceChangedCallback callbackCallback used to return the audio device change information.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The callback parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_GetAvailableDevices()

OH_AudioCommon_Result OH_AudioSessionManager_GetAvailableDevices(OH_AudioSessionManager *audioSessionManager, OH_AudioDevice_Usage deviceUsage, OH_AudioDeviceDescriptorArray **audioDeviceDescriptorArray)

Description

Obtains the available audio devices.

Since: 21

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioDevice_Usage deviceUsageType of audio device.
OH_AudioDeviceDescriptorArray **audioDeviceDescriptorArrayPointer to the audio device descriptors in the array.
Use OH_AudioSessionManager_ReleaseDevices to release the audioDeviceDescriptorArray pointer if the pointer is no longer needed.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The deviceUsage parameter is invalid.
3. The audioDeviceDescriptorArray parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_RegisterAvailableDevicesChangeCallback()

OH_AudioCommon_Result OH_AudioSessionManager_RegisterAvailableDevicesChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioDevice_Usage deviceUsage, OH_AudioSession_AvailableDeviceChangedCallback callback)

Description

Registers a callback to listen for available device change events.

Since: 21

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioDevice_Usage deviceUsageType of audio device.
OH_AudioSession_AvailableDeviceChangedCallback callbackCallback used to return the available audio device change information.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The deviceUsage parameter is set to an invalid value.
3. The callback parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_UnregisterAvailableDevicesChangeCallback()

OH_AudioCommon_Result OH_AudioSessionManager_UnregisterAvailableDevicesChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_AvailableDeviceChangedCallback callback)

Description

Unregisters the callback used to listen for available device change events.

Since: 21

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioSession_AvailableDeviceChangedCallback callbackCallback used to return the available audio device change information.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The callback parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_SelectMediaInputDevice()

OH_AudioCommon_Result OH_AudioSessionManager_SelectMediaInputDevice(OH_AudioSessionManager *audioSessionManager, OH_AudioDeviceDescriptor *deviceDescriptor)

Description

Selects a media input device. This function is not suitable for call recording, meaning it does not apply to situations where SourceType is SOURCE_TYPE_VOICE_COMMUNICATION.
When there is a concurrent recording stream with higher priority, the actual input device used by the application may differ from the one selected.
The application can use OH_AudioSessionManager_RegisterCurrentInputDeviceChangeCallback to register a callback to listen for the actual input device.

Since: 21

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioDeviceDescriptor *deviceDescriptorPointer to the target device, The available device must be in the array returned by OH_AudioSessionManager_GetAvailableDevices.
If nullptr is passed, the system clears the previous setting.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM: The audioSessionManager parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_GetSelectedMediaInputDevice()

OH_AudioCommon_Result OH_AudioSessionManager_GetSelectedMediaInputDevice(OH_AudioSessionManager *audioSessionManager, OH_AudioDeviceDescriptor **audioDeviceDescriptor)

Description

Obtains the media input device set by OH_AudioSessionManager_SelectMediaInputDevice.

Since: 21

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioDeviceDescriptor **audioDeviceDescriptorMedia device set by OH_AudioSessionManager_SelectMediaInputDevice. If no media device is set, a device of the AUDIO_DEVICE_TYPE_INVALID type is returned.
Use OH_AudioSessionManager_ReleaseDevice to release the audioDeviceDescriptor pointer if the pointer is no longer needed.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The audioDeviceDescriptor parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_SetBluetoothAndNearlinkPreferredRecordCategory()

OH_AudioCommon_Result OH_AudioSessionManager_SetBluetoothAndNearlinkPreferredRecordCategory(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory category)

Description

Sets the preferred device category for recording with Bluetooth or NearLink. Applications can set this category before connecting to Bluetooth or NearLink devices, and the system prioritizes using the device for recording when the device is connected.
When there is a concurrent recording stream with higher priority, the actual input device used by the application may differ from the set preferred device.
The application can use OH_AudioSessionManager_RegisterCurrentInputDeviceChangeCallback to register a callback to listen for the actual input device.

Since: 21

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory categoryPreferred device category available for recording with Bluetooth or NearLink.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The category parameter is incorrect.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_GetBluetoothAndNearlinkPreferredRecordCategory()

OH_AudioCommon_Result OH_AudioSessionManager_GetBluetoothAndNearlinkPreferredRecordCategory(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory *category)

Description

Obtains the preferred device category for recording with Bluetooth or NearLink.

Since: 21

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory *categoryPreferred device category available for recording with Bluetooth or NearLink.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The category parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_RegisterCurrentInputDeviceChangeCallback()

OH_AudioCommon_Result OH_AudioSessionManager_RegisterCurrentInputDeviceChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_CurrentInputDeviceChangedCallback callback)

Description

Registers a callback to listen for input device changes of an audio session manager.

Since: 21

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioSession_CurrentInputDeviceChangedCallback callbackCallback used to return the input audio device change information.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The callback parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_NO_MEMORY: The memory is insufficient.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_UnregisterCurrentInputDeviceChangeCallback()

OH_AudioCommon_Result OH_AudioSessionManager_UnregisterCurrentInputDeviceChangeCallback(OH_AudioSessionManager *audioSessionManager, OH_AudioSession_CurrentInputDeviceChangedCallback callback)

Description

Unregisters the callback used to listen for input device changes of an audio session manager.

Since: 21

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioSession_CurrentInputDeviceChangedCallback callbackCallback used to return the input audio device change information.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The callback parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_ReleaseDevice()

OH_AudioCommon_Result OH_AudioSessionManager_ReleaseDevice(OH_AudioSessionManager *audioSessionManager, OH_AudioDeviceDescriptor *audioDeviceDescriptor)

Description

Releases an audio device for an audio session manager.

Since: 21

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
OH_AudioDeviceDescriptor *audioDeviceDescriptorPointer to the audio device descriptor to be released.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM:
1. The audioSessionManager parameter is nullptr.
2. The audioDeviceDescriptor parameter is nullptr.

OH_AudioSessionManager_EnableMuteSuggestionWhenMixWithOthers()

OH_AudioCommon_Result OH_AudioSessionManager_EnableMuteSuggestionWhenMixWithOthers(OH_AudioSessionManager *audioSessionManager, bool enable)

Description

Enables the function of receiving mute playback suggestion notifications during mixed playback. Generally, in the audio mixing mode, if the audio of another application is played at the same time, the two pieces of audio are played in mixed mode. In certain scenarios (such as games or broadcasts), applications can enable mute suggestion notifications to enhance user experience. If this function is enabled, mute suggestion and unmute suggestion notifications are sent through the OH_AudioSession_StateChangedCallback callback after the audio session state change event is subscribed to. The callback is registered by OH_AudioSessionManager_RegisterStateChangeCallback.
Receiving the muted suggestion indicates that another application starts to play audio, and the played audio and the audio of this application cannot be mixed. This function is supported only for audio sessions for which OH_AudioSession_Scene is set and the activation mode is set to OH_AudioSession_ConcurrencyMode.CONCURRENCY_MIX_WITH_OTHERS.
This function takes effect only once when the audio session is activated. You need to enable the function again before each activation of the audio session.

Since: 23

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
bool enableWhether to enable the mute suggestion callback function. true to enable, false otherwise.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM: The audioSessionManager parameter is nullptr.
AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE:
1. Audio session scene not set.
2. Call this function after the audio session is activated.
AUDIOCOMMON_RESULT_ERROR_SYSTEM: A system error occurs, such as an abnormal exit of a system service.

OH_AudioSessionManager_IsOtherMediaPlaying()

bool OH_AudioSessionManager_IsOtherMediaPlaying(OH_AudioSessionManager *audioSessionManager)

Description

Checks whether audio of the MUSIC, MOVIE, AUDIOBOOK, and GAME media types is being played by other applications. The activated audio sessions of the media types are also checked.

Since: 23

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.

Returns

TypeDescription
boolWhether another application is playing media audio. true means yes; false otherwise.

OH_AudioSessionManager_SetBehavior()

OH_AudioCommon_Result OH_AudioSessionManager_SetBehavior(OH_AudioSessionManager *audioSessionManager, uint32_t behavior)

Description

Configures audio session behavior parameters. (Multiple flags can be combined.) If this API is called while an audio session is active, you must call the OH_AudioSessionManager_ActivateAudioSession API again for the settings to take effect.

Since: 24

Parameters

NameDescription
OH_AudioSessionManager *audioSessionManagerPointer to the audio session management instance created by OH_AudioManager_GetAudioSessionManager.
uint32_t behaviorAudio session behavior flag. This can be a single flag or a bitwise OR combination of multiple flags. For details about the supported audio session behaviors, see OH_AudioSession_BehaviorFlags.

Returns

TypeDescription
OH_AudioCommon_ResultAUDIOCOMMON_RESULT_SUCCESS: The function is executed successfully.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM: The parameter value is a null pointer or out of range.
AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE: Invalid state.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-native-audiostreambuilder-h

openharmony 鸿蒙 capi-ohaudiosuite

openharmony 鸿蒙 js-apis-inner-multimedia-systemSoundPlayer

openharmony 鸿蒙 arkts-apis-audio-i

openharmony 鸿蒙 capi-ohaudio

openharmony 鸿蒙 capi-ohmidi

openharmony 鸿蒙 arkts-apis-audio-AudioManager

openharmony 鸿蒙 capi-ohaudiosuite-oh-audiosuite-spacerenderpositionparams

openharmony 鸿蒙 capi-ohaudio-oh-audiostreaminfo

openharmony 鸿蒙 errorcode-ringtone

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/diouuBV0