1# native_audio_device_base.h 2 3## Overview 4 5The file declares the types of audio device parameters and the functions for obtaining these parameters. 6 7**Library**: libohaudio.so 8 9**File to include**: <ohaudio/native_audio_device_base.h> 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### Structs 20 21| Name| typedef Keyword| Description| 22| -- | -- | -- | 23| [OH_AudioDeviceDescriptorArray](capi-ohaudio-oh-audiodevicedescriptorarray.md) | OH_AudioDeviceDescriptorArray | Describes an array of audio device descriptors.| 24| [OH_AudioDeviceDescriptor](capi-ohaudio-oh-audiodevicedescriptor.md) | OH_AudioDeviceDescriptor | Describes an audio device descriptor, which provides attributes of an audio device.| 25 26### Enums 27 28| Name| typedef Keyword| Description| 29| -- | -- | -- | 30| [OH_AudioDevice_ChangeType](#oh_audiodevice_changetype) | OH_AudioDevice_ChangeType | Enumerates the types of audio device changes.| 31| [OH_AudioDevice_Role](#oh_audiodevice_role) | OH_AudioDevice_Role | Enumerates the roles of audio devices.| 32| [OH_AudioDevice_Type](#oh_audiodevice_type) | OH_AudioDevice_Type | Enumerates the types of audio devices.| 33| [OH_AudioDevice_Flag](#oh_audiodevice_flag) | OH_AudioDevice_Flag | Enumerates the flags of audio devices.| 34| [OH_AudioDevice_Usage](#oh_audiodevice_usage) | OH_AudioDevice_Usage | Enumerates the usage scenarios of audio devices.| 35| [OH_AudioDevice_BlockStatus](#oh_audiodevice_blockstatus) | OH_AudioDevice_BlockStatus | Enumerates the blocked status of audio devices. By default, an audio device is not blocked.| 36 37### Functions 38 39| Name| Description| 40| -- | -- | 41| [OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceRole(OH_AudioDeviceDescriptor *audioDeviceDescriptor,OH_AudioDevice_Role *deviceRole)](#oh_audiodevicedescriptor_getdevicerole) | Obtains the device role based on an audio device descriptor.| 42| [OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceType(OH_AudioDeviceDescriptor *audioDeviceDescriptor,OH_AudioDevice_Type *deviceType)](#oh_audiodevicedescriptor_getdevicetype) | Obtains the device type based on an audio device descriptor.| 43| [OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceId(OH_AudioDeviceDescriptor *audioDeviceDescriptor,uint32_t *id)](#oh_audiodevicedescriptor_getdeviceid) | Obtains the device ID based on an audio device descriptor.| 44| [OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceName(OH_AudioDeviceDescriptor *audioDeviceDescriptor,char **name)](#oh_audiodevicedescriptor_getdevicename) | Obtains the device name based on an audio device descriptor.| 45| [OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceAddress(OH_AudioDeviceDescriptor *audioDeviceDescriptor,char **address)](#oh_audiodevicedescriptor_getdeviceaddress) | Obtains the device address based on an audio device descriptor.| 46| [OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceSampleRates(OH_AudioDeviceDescriptor *audioDeviceDescriptor,uint32_t **sampleRates, uint32_t *size)](#oh_audiodevicedescriptor_getdevicesamplerates) | Obtains the sample rates based on an audio device descriptor.| 47| [OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceChannelCounts(OH_AudioDeviceDescriptor *audioDeviceDescriptor,uint32_t **channelCounts, uint32_t *size)](#oh_audiodevicedescriptor_getdevicechannelcounts) | Obtains an array that holds the number of device channels based on an audio device descriptor.| 48| [OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceDisplayName(OH_AudioDeviceDescriptor *audioDeviceDescriptor,char **displayName)](#oh_audiodevicedescriptor_getdevicedisplayname) | Obtains the device display name based on an audio device descriptor.| 49| [OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceEncodingTypes(OH_AudioDeviceDescriptor *audioDeviceDescriptor,OH_AudioStream_EncodingType **encodingTypes, uint32_t *size)](#oh_audiodevicedescriptor_getdeviceencodingtypes) | Obtains the device encoding types based on an audio device descriptor.| 50 51## Enum Description 52 53### OH_AudioDevice_ChangeType 54 55``` 56enum OH_AudioDevice_ChangeType 57``` 58 59**Description** 60 61Enumerates the types of audio device changes. 62 63**Since**: 12 64 65| Enum Item| Description| 66| -- | -- | 67| AUDIO_DEVICE_CHANGE_TYPE_CONNECT = 0 | Device connected.| 68| AUDIO_DEVICE_CHANGE_TYPE_DISCONNECT = 1 | Device disconnected.| 69 70### OH_AudioDevice_Role 71 72``` 73enum OH_AudioDevice_Role 74``` 75 76**Description** 77 78Enumerates the roles of audio devices. 79 80**Since**: 12 81 82| Enum Item| Description| 83| -- | -- | 84| AUDIO_DEVICE_ROLE_INPUT = 1 | Input device.| 85| AUDIO_DEVICE_ROLE_OUTPUT = 2 | Output device.| 86 87### OH_AudioDevice_Type 88 89``` 90enum OH_AudioDevice_Type 91``` 92 93**Description** 94 95Enumerates the types of audio devices. 96 97**Since**: 12 98 99| Enum Item| Description| 100| -- | -- | 101| AUDIO_DEVICE_TYPE_INVALID = 0 | Invalid device.| 102| AUDIO_DEVICE_TYPE_EARPIECE = 1 | Earpiece.| 103| AUDIO_DEVICE_TYPE_SPEAKER = 2 | Speaker.| 104| AUDIO_DEVICE_TYPE_WIRED_HEADSET = 3 | Wired headset with a microphone.| 105| AUDIO_DEVICE_TYPE_WIRED_HEADPHONES = 4 | Wired headset without microphone.| 106| AUDIO_DEVICE_TYPE_BLUETOOTH_SCO = 7 | Bluetooth device using Synchronous Connection-oriented (SCO) links.| 107| AUDIO_DEVICE_TYPE_BLUETOOTH_A2DP = 8 | Bluetooth device using Advanced Audio Distribution Profile (A2DP) links.| 108| AUDIO_DEVICE_TYPE_MIC = 15 | Microphone.| 109| AUDIO_DEVICE_TYPE_USB_HEADSET = 22 | USB headset.| 110| AUDIO_DEVICE_TYPE_DISPLAY_PORT = 23 | Display port device.| 111| AUDIO_DEVICE_TYPE_REMOTE_CAST = 24 | Remote cast device.| 112| AUDIO_DEVICE_TYPE_USB_DEVICE = 25 | USB device (excluding USB headsets).<br>**Since**: 18| 113| AUDIO_DEVICE_TYPE_ACCESSORY = 26 | Accessory device, such as the microphone on a remote control.<br>**Since**: 18| 114| AUDIO_DEVICE_TYPE_HDMI = 27 | HDMI device (such as HDMI, ARC, and eARC).<br>**Since**: 19| 115| AUDIO_DEVICE_TYPE_LINE_DIGITAL = 28 | Wired digital device (such as S/PDIF)<br>**Since**: 19| 116| AUDIO_DEVICE_TYPE_NEARLINK = 31 | NearLink device.<br>**Since**: 20| 117| AUDIO_DEVICE_TYPE_DEFAULT = 1000 | Default device type.| 118 119### OH_AudioDevice_Flag 120 121``` 122enum OH_AudioDevice_Flag 123``` 124 125**Description** 126 127Enumerates the flags of audio devices. 128 129**Since**: 12 130 131| Enum Item| Description| 132| -- | -- | 133| AUDIO_DEVICE_FLAG_NONE = 0 | No flag.| 134| AUDIO_DEVICE_FLAG_OUTPUT = 1 | Output device.| 135| AUDIO_DEVICE_FLAG_INPUT = 2 | Input device.| 136| AUDIO_DEVICE_FLAG_ALL = 3 | All devices.| 137 138### OH_AudioDevice_Usage 139 140``` 141enum OH_AudioDevice_Usage 142``` 143 144**Description** 145 146Enumerates the usage scenarios of audio devices. 147 148**Since**: 12 149 150| Enum Item| Description| 151| -- | -- | 152| AUDIO_DEVICE_USAGE_MEDIA_OUTPUT = 1 | Media output device.| 153| AUDIO_DEVICE_USAGE_MEDIA_INPUT = 2 | Media input device.| 154| AUDIO_DEVICE_USAGE_MEDIA_ALL = 3 | All media devices.| 155| AUDIO_DEVICE_USAGE_CALL_OUTPUT = 4 | Call output device.| 156| AUDIO_DEVICE_USAGE_CALL_INPUT = 8 | Call input device.| 157| AUDIO_DEVICE_USAGE_CALL_ALL = 12 | All call devices.| 158 159### OH_AudioDevice_BlockStatus 160 161``` 162enum OH_AudioDevice_BlockStatus 163``` 164 165**Description** 166 167Enumerates the blocked status of audio devices. By default, an audio device is not blocked. 168 169**Since**: 13 170 171| Enum Item| Description| 172| -- | -- | 173| AUDIO_DEVICE_UNBLOCKED = 0 | The audio device is not blocked.| 174| AUDIO_DEVICE_BLOCKED = 1 | The audio device is blocked.| 175 176 177## Function Description 178 179### OH_AudioDeviceDescriptor_GetDeviceRole() 180 181``` 182OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceRole(OH_AudioDeviceDescriptor *audioDeviceDescriptor,OH_AudioDevice_Role *deviceRole) 183``` 184 185**Description** 186 187Obtains the device role based on an audio device descriptor. 188 189**Since**: 12 190 191 192**Parameters** 193 194| Name| Description| 195| -- | -- | 196| [OH_AudioDeviceDescriptor](capi-ohaudio-oh-audiodevicedescriptor.md) *audioDeviceDescriptor | Pointer to an audio device descriptor, which is obtained by calling [OH_AudioRoutingManager_GetDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_getdevices) or [OH_AudioRoutingManager_OnDeviceChangedCallback](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_ondevicechangedcallback).| 197| [OH_AudioDevice_Role](#oh_audiodevice_role) *deviceRole | Pointer to the device role. This variable, which will store the device role value, points to an [OH_AudioDevice_Role](#oh_audiodevice_role). | 198 199**Returns** 200 201| Type| Description| 202| -- | -- | 203| [OH_AudioCommon_Result](capi-native-audio-common-h.md#oh_audiocommon_result) | Operation result. **AUDIOCOMMON_RESULT_SUCCESS** is returned if the operation is successful; **AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM** is returned otherwise.| 204 205### OH_AudioDeviceDescriptor_GetDeviceType() 206 207``` 208OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceType(OH_AudioDeviceDescriptor *audioDeviceDescriptor,OH_AudioDevice_Type *deviceType) 209``` 210 211**Description** 212 213Obtains the device type based on an audio device descriptor. 214 215**Since**: 12 216 217 218**Parameters** 219 220| Name| Description| 221| -- | -- | 222| [OH_AudioDeviceDescriptor](capi-ohaudio-oh-audiodevicedescriptor.md) *audioDeviceDescriptor | Pointer to an audio device descriptor, which is obtained by calling [OH_AudioRoutingManager_GetDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_getdevices) or [OH_AudioRoutingManager_OnDeviceChangedCallback](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_ondevicechangedcallback).| 223| [OH_AudioDevice_Type](#oh_audiodevice_type) *deviceType | Pointer to the device type. This variable, which will store the device type value, points to an [OH_AudioDevice_Type](capi-native-audio-device-base-h.md#oh_audiodevice_type).| 224 225**Returns** 226 227| Type| Description| 228| -- | -- | 229| [OH_AudioCommon_Result](capi-native-audio-common-h.md#oh_audiocommon_result) | Operation result. **AUDIOCOMMON_RESULT_SUCCESS** is returned if the operation is successful; **AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM** is returned otherwise.| 230 231### OH_AudioDeviceDescriptor_GetDeviceId() 232 233``` 234OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceId(OH_AudioDeviceDescriptor *audioDeviceDescriptor,uint32_t *id) 235``` 236 237**Description** 238 239Obtains the device ID based on an audio device descriptor. 240 241**Since**: 12 242 243 244**Parameters** 245 246| Name| Description| 247| -- | -- | 248| [OH_AudioDeviceDescriptor](capi-ohaudio-oh-audiodevicedescriptor.md) *audioDeviceDescriptor | Pointer to an audio device descriptor, which is obtained by calling [OH_AudioRoutingManager_GetDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_getdevices) or [OH_AudioRoutingManager_OnDeviceChangedCallback](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_ondevicechangedcallback).| 249| uint32_t *id | Pointer to the device ID, which is a variable for setting the device role.| 250 251**Returns** 252 253| Type| Description| 254| -- | -- | 255| [OH_AudioCommon_Result](capi-native-audio-common-h.md#oh_audiocommon_result) | Operation result. **AUDIODEVICE_SUCCESS** is returned if the operation is successful; **AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM** is returned otherwise.| 256 257### OH_AudioDeviceDescriptor_GetDeviceName() 258 259``` 260OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceName(OH_AudioDeviceDescriptor *audioDeviceDescriptor,char **name) 261``` 262 263**Description** 264 265Obtains the device name based on an audio device descriptor. 266 267**Since**: 12 268 269 270**Parameters** 271 272| Name| Description| 273| -- | -- | 274| [OH_AudioDeviceDescriptor](capi-ohaudio-oh-audiodevicedescriptor.md) *audioDeviceDescriptor | Pointer to an audio device descriptor, which is obtained by calling [OH_AudioRoutingManager_GetDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_getdevices) or [OH_AudioRoutingManager_OnDeviceChangedCallback](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_ondevicechangedcallback).| 275| char **name | Double pointer to the device name.<br>Do not release the pointer to the device name separately. Instead, call [OH_AudioRoutingManager_ReleaseDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_releasedevices) to release all the device descriptors when they are no longer needed.| 276 277**Returns** 278 279| Type| Description| 280| -- | -- | 281| [OH_AudioCommon_Result](capi-native-audio-common-h.md#oh_audiocommon_result) | Operation result. **AUDIOCOMMON_RESULT_SUCCESS** is returned if the operation is successful; **AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM** is returned otherwise.| 282 283### OH_AudioDeviceDescriptor_GetDeviceAddress() 284 285``` 286OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceAddress(OH_AudioDeviceDescriptor *audioDeviceDescriptor,char **address) 287``` 288 289**Description** 290 291Obtains the device address based on an audio device descriptor. 292 293**Since**: 12 294 295 296**Parameters** 297 298| Name| Description| 299| -- | -- | 300| [OH_AudioDeviceDescriptor](capi-ohaudio-oh-audiodevicedescriptor.md) *audioDeviceDescriptor | Pointer to an audio device descriptor, which is obtained by calling [OH_AudioRoutingManager_GetDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_getdevices) or [OH_AudioRoutingManager_OnDeviceChangedCallback](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_ondevicechangedcallback).| 301| char **address | Double pointer to the MAC address of the device.<br>Do not release the pointer to the MAC address separately. Instead, call [OH_AudioRoutingManager_ReleaseDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_releasedevices) to release all the device descriptors when they are no longer needed.| 302 303**Returns** 304 305| Type| Description| 306| -- | -- | 307| [OH_AudioCommon_Result](capi-native-audio-common-h.md#oh_audiocommon_result) | Operation result. **AUDIOCOMMON_RESULT_SUCCESS** is returned if the operation is successful; **AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM** is returned otherwise.| 308 309### OH_AudioDeviceDescriptor_GetDeviceSampleRates() 310 311``` 312OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceSampleRates(OH_AudioDeviceDescriptor *audioDeviceDescriptor,uint32_t **sampleRates, uint32_t *size) 313``` 314 315**Description** 316 317Obtains the sample rates based on an audio device descriptor. 318 319**Since**: 12 320 321 322**Parameters** 323 324| Name| Description| 325| -- | -- | 326| [OH_AudioDeviceDescriptor](capi-ohaudio-oh-audiodevicedescriptor.md) *audioDeviceDescriptor | Pointer to an audio device descriptor, which is obtained by calling [OH_AudioRoutingManager_GetDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_getdevices) or [OH_AudioRoutingManager_OnDeviceChangedCallback](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_ondevicechangedcallback).| 327| uint32_t **sampleRates | Double pointer to the array of sample rates.<br>Do not release the pointer to the sample rates separately. Instead, call [OH_AudioRoutingManager_ReleaseDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_releasedevices) to release all the device descriptors when they are no longer needed.| 328| uint32_t *size | Pointer to the size of the array.| 329 330**Returns** 331 332| Type| Description| 333| -- | -- | 334| [OH_AudioCommon_Result](capi-native-audio-common-h.md#oh_audiocommon_result) | Operation result. **AUDIOCOMMON_RESULT_SUCCESS** is returned if the operation is successful; **AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM** is returned otherwise.| 335 336### OH_AudioDeviceDescriptor_GetDeviceChannelCounts() 337 338``` 339OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceChannelCounts(OH_AudioDeviceDescriptor *audioDeviceDescriptor,uint32_t **channelCounts, uint32_t *size) 340``` 341 342**Description** 343 344Obtains an array that holds the number of device channels based on an audio device descriptor. 345 346**Since**: 12 347 348 349**Parameters** 350 351| Name| Description| 352| -- | -- | 353| [OH_AudioDeviceDescriptor](capi-ohaudio-oh-audiodevicedescriptor.md) *audioDeviceDescriptor | Pointer to an audio device descriptor, which is obtained by calling [OH_AudioRoutingManager_GetDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_getdevices) or [OH_AudioRoutingManager_OnDeviceChangedCallback](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_ondevicechangedcallback).| 354| uint32_t **channelCounts | Double pointer to the array that holds the channel counts.<br>Do not release the pointer to the channel counts separately. Instead, call [OH_AudioRoutingManager_ReleaseDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_releasedevices) to release all the device descriptors when they are no longer needed.| 355| uint32_t *size | Pointer to the size of the array.| 356 357**Returns** 358 359| Type| Description| 360| -- | -- | 361| [OH_AudioCommon_Result](capi-native-audio-common-h.md#oh_audiocommon_result) | Operation result. **AUDIOCOMMON_RESULT_SUCCESS** is returned if the operation is successful; **AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM** is returned otherwise.| 362 363### OH_AudioDeviceDescriptor_GetDeviceDisplayName() 364 365``` 366OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceDisplayName(OH_AudioDeviceDescriptor *audioDeviceDescriptor,char **displayName) 367``` 368 369**Description** 370 371Obtains the device display name based on an audio device descriptor. 372 373**Since**: 12 374 375 376**Parameters** 377 378| Name| Description| 379| -- | -- | 380| [OH_AudioDeviceDescriptor](capi-ohaudio-oh-audiodevicedescriptor.md) *audioDeviceDescriptor | Pointer to an audio device descriptor, which is obtained by calling [OH_AudioRoutingManager_GetDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_getdevices) or [OH_AudioRoutingManager_OnDeviceChangedCallback](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_ondevicechangedcallback).| 381| char **displayName | Double pointer to the display name.<br>Do not release the pointer to the display name separately. Instead, call [OH_AudioRoutingManager_ReleaseDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_releasedevices) to release all the device descriptors when they are no longer needed.| 382 383**Returns** 384 385| Type| Description| 386| -- | -- | 387| [OH_AudioCommon_Result](capi-native-audio-common-h.md#oh_audiocommon_result) | Operation result. **AUDIOCOMMON_RESULT_SUCCESS** is returned if the operation is successful; **AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM** is returned otherwise.| 388 389### OH_AudioDeviceDescriptor_GetDeviceEncodingTypes() 390 391``` 392OH_AudioCommon_Result OH_AudioDeviceDescriptor_GetDeviceEncodingTypes(OH_AudioDeviceDescriptor *audioDeviceDescriptor,OH_AudioStream_EncodingType **encodingTypes, uint32_t *size) 393``` 394 395**Description** 396 397Obtains the device encoding types based on an audio device descriptor. 398 399**Since**: 12 400 401 402**Parameters** 403 404| Name| Description| 405| -- | -- | 406| [OH_AudioDeviceDescriptor](capi-ohaudio-oh-audiodevicedescriptor.md) *audioDeviceDescriptor | Pointer to an audio device descriptor, which is obtained by calling [OH_AudioRoutingManager_GetDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_getdevices) or [OH_AudioRoutingManager_OnDeviceChangedCallback](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_ondevicechangedcallback).| 407| [OH_AudioStream_EncodingType](capi-native-audiostream-base-h.md#oh_audiostream_encodingtype) **encodingTypes | Double pointer to the device encoding type. For details about the available options, see [OH_AudioStream_EncodingType](capi-native-audiostream-base-h.md#oh_audiostream_encodingtype).<br>Do not release the pointer to the encoding type separately. Instead, call [OH_AudioRoutingManager_ReleaseDevices](capi-native-audio-routing-manager-h.md#oh_audioroutingmanager_releasedevices) to release all the device descriptors when they are no longer needed.| 408| uint32_t *size | Pointer to the size of the device encoding type.| 409 410**Returns** 411 412| Type| Description| 413| -- | -- | 414| [OH_AudioCommon_Result](capi-native-audio-common-h.md#oh_audiocommon_result) | Operation result. **AUDIOCOMMON_RESULT_SUCCESS** is returned if the operation is successful; **AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM** is returned otherwise.| 415