native_audio_common.h

Overview

The native_audio_common.h file declares the common basic audio data structs.

It defines the types of the common return values of audio interfaces.

Library: libohaudio.so

File to include: <ohaudio/native_audio_common.h>

System capability: SystemCapability.Multimedia.Audio.Core

Since: 12

Related module: OHAudio

Summary

Enums

Name Description
OH_AudioCommon_Result {
AUDIOCOMMON_RESULT_SUCCESS = 0,
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM = 6800101,
AUDIOCOMMON_RESULT_ERROR_NO_MEMORY = 6800102,
AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE = 6800103,
AUDIOCOMMON_RESULT_ERROR_UNSUPPORTED = 6800104,
AUDIOCOMMON_RESULT_ERROR_TIMEOUT = 6800105,
AUDIOCOMMON_RESULT_ERROR_STREAM_LIMIT = 6800201,
AUDIOCOMMON_RESULT_ERROR_SYSTEM = 6800301
}
Enumerates the audio operation results.
OH_AudioScene {
AUDIO_SCENE_DEFAULT = 0,
AUDIO_SCENE_RINGING = 1,
AUDIO_SCENE_PHONE_CALL = 2,
AUDIO_SCENE_VOICE_CHAT = 3
}
Enumerates the audio scenes.