1# native_audio_common.h 2 3## Overview 4 5The file declares the common basic audio data structs. It defines the types of the common return values of audio interfaces. 6 7**File to include**: <ohaudio/native_audio_common.h> 8 9**Library**: libohaudio.so 10 11**System capability**: SystemCapability.Multimedia.Audio.Core 12 13**Since**: 12 14 15**Related module**: [OHAudio](capi-ohaudio.md) 16 17## Summary 18 19### Enums 20 21| Name| typedef Keyword| Description| 22| -- | -- | -- | 23| [OH_AudioCommon_Result](#oh_audiocommon_result) | OH_AudioCommon_Result | Enumerates the audio operation results.| 24| [OH_AudioScene](#oh_audioscene) | OH_AudioScene | Enumerates the audio scenes.| 25| [OH_AudioRingerMode](#oh_audioringermode) | OH_AudioRingerMode | Enumerates the ringer mode.| 26 27## Enum Description 28 29### OH_AudioCommon_Result 30 31``` 32enum OH_AudioCommon_Result 33``` 34 35**Description** 36 37Enumerates the audio operation results. 38 39**Since**: 12 40 41| Enum Item| Description| 42| -- | -- | 43| AUDIOCOMMON_RESULT_SUCCESS = 0 | Operation successful.| 44| AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM = 6800101 | Incorrect parameter.| 45| AUDIOCOMMON_RESULT_ERROR_NO_MEMORY = 6800102 | No memory.| 46| AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE = 6800103 | Invalid state.| 47| AUDIOCOMMON_RESULT_ERROR_UNSUPPORTED = 6800104 | Unsupported operation.| 48| AUDIOCOMMON_RESULT_ERROR_TIMEOUT = 6800105 | Operation timeout.| 49| AUDIOCOMMON_RESULT_ERROR_STREAM_LIMIT = 6800201 | Reached the maximum number of audio streams allowed.| 50| AUDIOCOMMON_RESULT_ERROR_SYSTEM = 6800301 | System error.| 51 52### OH_AudioScene 53 54``` 55enum OH_AudioScene 56``` 57 58**Description** 59 60Enumerates the audio scenes. 61 62**Since**: 12 63 64| Enum Item| Description| 65| -- | -- | 66| AUDIO_SCENE_DEFAULT = 0 | Default audio scene.| 67| AUDIO_SCENE_RINGING = 1 | Ringing scene.| 68| AUDIO_SCENE_PHONE_CALL = 2 | Phone call scene.| 69| AUDIO_SCENE_VOICE_CHAT = 3 | Voice chat scene.| 70 71### OH_AudioRingerMode 72 73``` 74enum OH_AudioRingerMode 75``` 76 77**Description** 78 79Enumerates the ringer mode. 80 81**Since**: 20 82 83| Enum Item| Description| 84| -- | -- | 85| AUDIO_RINGER_MODE_SILENT = 0 | Silent mode.<br>**Since**: 20| 86| AUDIO_RINGER_MODE_VIBRATE = 1 | Vibration mode.<br>**Since**: 20| 87| AUDIO_RINGER_MODE_NORMAL = 2 | Normal mode.<br>**Since**: 20| 88