openharmony 鸿蒙 capi-native-audio-common-h

2026-08-25 浏览 (1)

native_audio_common.h

Overview

The file declares the common basic audio data structs.
It defines the types of the common return values of audio interfaces.

File to include: <ohaudio/native_audio_common.h>

Library: libohaudio.so

System capability: SystemCapability.Multimedia.Audio.Core

Since: 12

Related module: OHAudio

Summary

Enums

Nametypedef KeywordDescription
OH_AudioCommon_ResultOH_AudioCommon_ResultEnumerates the audio operation results.
OH_AudioSceneOH_AudioSceneEnumerates the audio scenes.
OH_AudioRingerModeOH_AudioRingerModeEnumerates the ringer mode.

Enum Description

OH_AudioCommon_Result

enum OH_AudioCommon_Result

Description

Enumerates the audio operation results.

Since: 12

Enum ItemDescription
AUDIOCOMMON_RESULT_SUCCESS = 0Operation successful.
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM = 6800101Incorrect parameter.
AUDIOCOMMON_RESULT_ERROR_NO_MEMORY = 6800102No memory.
AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE = 6800103Invalid state.
AUDIOCOMMON_RESULT_ERROR_UNSUPPORTED = 6800104Unsupported operation.
AUDIOCOMMON_RESULT_ERROR_TIMEOUT = 6800105Operation timeout.
AUDIOCOMMON_RESULT_ERROR_STREAM_LIMIT = 6800201Reached the maximum number of audio streams allowed.
AUDIOCOMMON_RESULT_ERROR_SYSTEM = 6800301System error.

OH_AudioScene

enum OH_AudioScene

Description

Enumerates the audio scenes.

Since: 12

Enum ItemDescription
AUDIO_SCENE_DEFAULT = 0Default audio scene.
AUDIO_SCENE_RINGING = 1Ringing scene.
AUDIO_SCENE_PHONE_CALL = 2Phone call scene.
AUDIO_SCENE_VOICE_CHAT = 3Voice chat scene.

OH_AudioRingerMode

enum OH_AudioRingerMode

Description

Enumerates the ringer mode.

Device behavior difference: If this API is set to the vibration mode on a device without a vibration component, no vibration effect is generated.

Since: 20

Enum ItemDescription
AUDIO_RINGER_MODE_SILENT = 0Silent mode.
AUDIO_RINGER_MODE_VIBRATE = 1Vibration mode.
AUDIO_RINGER_MODE_NORMAL = 2Normal mode.

你可能感兴趣的鸿蒙文章

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/LC9w1CUa