ohaudio-sys 0.1.0

Raw Bindings to the audio module of OpenHarmony
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
// automatically generated by rust-bindgen 0.71.1

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
use crate::audio_common::OH_AudioCommon_Result;
use crate::audiostream_base::OH_AudioStream_EncodingType;

#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl OH_AudioDevice_ChangeType {
    /// Device connection.
    pub const AUDIO_DEVICE_CHANGE_TYPE_CONNECT: OH_AudioDevice_ChangeType =
        OH_AudioDevice_ChangeType(0);
    /// Device disconnection.
    pub const AUDIO_DEVICE_CHANGE_TYPE_DISCONNECT: OH_AudioDevice_ChangeType =
        OH_AudioDevice_ChangeType(1);
}
#[repr(transparent)]
/// Defines the audio device change type.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_AudioDevice_ChangeType(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl OH_AudioDevice_Role {
    /// Input role.
    pub const AUDIO_DEVICE_ROLE_INPUT: OH_AudioDevice_Role = OH_AudioDevice_Role(1);
    /// Output role.
    pub const AUDIO_DEVICE_ROLE_OUTPUT: OH_AudioDevice_Role = OH_AudioDevice_Role(2);
}
#[repr(transparent)]
/// Defines the audio device device role.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_AudioDevice_Role(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl OH_AudioDevice_Type {
    /// Invalid device.
    pub const AUDIO_DEVICE_TYPE_INVALID: OH_AudioDevice_Type = OH_AudioDevice_Type(0);
    /// Built-in earpiece.
    pub const AUDIO_DEVICE_TYPE_EARPIECE: OH_AudioDevice_Type = OH_AudioDevice_Type(1);
    /// Built-in speaker.
    pub const AUDIO_DEVICE_TYPE_SPEAKER: OH_AudioDevice_Type = OH_AudioDevice_Type(2);
    /// Wired headset, which is a combination of a pair of earpieces and a microphone.
    pub const AUDIO_DEVICE_TYPE_WIRED_HEADSET: OH_AudioDevice_Type = OH_AudioDevice_Type(3);
    /// A pair of wired headphones.
    pub const AUDIO_DEVICE_TYPE_WIRED_HEADPHONES: OH_AudioDevice_Type = OH_AudioDevice_Type(4);
    /// Bluetooth device using the synchronous connection oriented link (SCO).
    pub const AUDIO_DEVICE_TYPE_BLUETOOTH_SCO: OH_AudioDevice_Type = OH_AudioDevice_Type(7);
    /// Bluetooth device using advanced audio distibution profile (A2DP).
    pub const AUDIO_DEVICE_TYPE_BLUETOOTH_A2DP: OH_AudioDevice_Type = OH_AudioDevice_Type(8);
    /// Built-in microphone.
    pub const AUDIO_DEVICE_TYPE_MIC: OH_AudioDevice_Type = OH_AudioDevice_Type(15);
    /// USB audio headset.
    pub const AUDIO_DEVICE_TYPE_USB_HEADSET: OH_AudioDevice_Type = OH_AudioDevice_Type(22);
    /// Display port device.
    pub const AUDIO_DEVICE_TYPE_DISPLAY_PORT: OH_AudioDevice_Type = OH_AudioDevice_Type(23);
    /// Device type for rerouting audio to other remote devices by system application.
    pub const AUDIO_DEVICE_TYPE_REMOTE_CAST: OH_AudioDevice_Type = OH_AudioDevice_Type(24);
    /// Usb audio device.
    ///
    ///
    /// Available since API-level: 18
    #[cfg(feature = "api-18")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
    pub const AUDIO_DEVICE_TYPE_USB_DEVICE: OH_AudioDevice_Type = OH_AudioDevice_Type(25);
    /// Accessory device, such as the microphone on a remote control.
    ///
    /// Available since API-level: 19
    #[cfg(feature = "api-19")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
    pub const AUDIO_DEVICE_TYPE_ACCESSORY: OH_AudioDevice_Type = OH_AudioDevice_Type(26);
    /// HDMI device, such as a device connected through an HDMI, ARC, or eARC interface.
    ///
    /// Available since API-level: 19
    #[cfg(feature = "api-19")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
    pub const AUDIO_DEVICE_TYPE_HDMI: OH_AudioDevice_Type = OH_AudioDevice_Type(27);
    /// Line-connected, digital audio output device, such as an S/PDIF device.
    ///
    /// Available since API-level: 19
    #[cfg(feature = "api-19")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
    pub const AUDIO_DEVICE_TYPE_LINE_DIGITAL: OH_AudioDevice_Type = OH_AudioDevice_Type(28);
    /// Hearing aid device.
    ///
    /// Available since API-level: 20
    #[cfg(feature = "api-20")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
    pub const AUDIO_DEVICE_TYPE_HEARING_AID: OH_AudioDevice_Type = OH_AudioDevice_Type(30);
    /// Nearlink device.
    ///
    /// Available since API-level: 20
    #[cfg(feature = "api-20")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
    pub const AUDIO_DEVICE_TYPE_NEARLINK: OH_AudioDevice_Type = OH_AudioDevice_Type(31);
    /// Default device type.
    pub const AUDIO_DEVICE_TYPE_DEFAULT: OH_AudioDevice_Type = OH_AudioDevice_Type(1000);
}
#[repr(transparent)]
/// Defines the audio device device type.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_AudioDevice_Type(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl OH_AudioDevice_Flag {
    /// None device.
    pub const AUDIO_DEVICE_FLAG_NONE: OH_AudioDevice_Flag = OH_AudioDevice_Flag(0);
    /// Output device.
    pub const AUDIO_DEVICE_FLAG_OUTPUT: OH_AudioDevice_Flag = OH_AudioDevice_Flag(1);
    /// Input device.
    pub const AUDIO_DEVICE_FLAG_INPUT: OH_AudioDevice_Flag = OH_AudioDevice_Flag(2);
    /// All device.
    pub const AUDIO_DEVICE_FLAG_ALL: OH_AudioDevice_Flag = OH_AudioDevice_Flag(3);
}
#[repr(transparent)]
/// Defines the audio device flag.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_AudioDevice_Flag(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl OH_AudioDevice_Usage {
    /// Device used for media ouput.
    ///
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const AUDIO_DEVICE_USAGE_MEDIA_OUTPUT: OH_AudioDevice_Usage = OH_AudioDevice_Usage(1);
    /// Device used for media input.
    ///
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const AUDIO_DEVICE_USAGE_MEDIA_INPUT: OH_AudioDevice_Usage = OH_AudioDevice_Usage(2);
    /// Device used for media, including input and output.
    ///
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const AUDIO_DEVICE_USAGE_MEDIA_ALL: OH_AudioDevice_Usage = OH_AudioDevice_Usage(3);
    /// Device used for call output.
    ///
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const AUDIO_DEVICE_USAGE_CALL_OUTPUT: OH_AudioDevice_Usage = OH_AudioDevice_Usage(4);
    /// Device used for call input.
    ///
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const AUDIO_DEVICE_USAGE_CALL_INPUT: OH_AudioDevice_Usage = OH_AudioDevice_Usage(8);
    /// Device used for call, including input and output.
    ///
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const AUDIO_DEVICE_USAGE_CALL_ALL: OH_AudioDevice_Usage = OH_AudioDevice_Usage(12);
}
#[repr(transparent)]
/// Defines the audio device usage.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_AudioDevice_Usage(pub ::core::ffi::c_uint);
/// Declaring the audio device descriptor.
/// The instance is used to get more audio device detail attributes.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct OH_AudioDeviceDescriptor {
    _unused: [u8; 0],
}
/// Declaring the audio device descriptor array.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_AudioDeviceDescriptorArray {
    /// Audio device descriptor array size.
    pub size: u32,
    /// Audio device descriptor array.
    pub descriptors: *mut *mut OH_AudioDeviceDescriptor,
}
#[cfg(feature = "api-13")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
impl OH_AudioDevice_BlockStatus {
    /// Audio device is unblocked.
    ///
    ///
    /// Available since API-level: 13
    #[cfg(feature = "api-13")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
    pub const AUDIO_DEVICE_UNBLOCKED: OH_AudioDevice_BlockStatus = OH_AudioDevice_BlockStatus(0);
    /// Audio Device is blocked.
    ///
    ///
    /// Available since API-level: 13
    #[cfg(feature = "api-13")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
    pub const AUDIO_DEVICE_BLOCKED: OH_AudioDevice_BlockStatus = OH_AudioDevice_BlockStatus(1);
}
#[repr(transparent)]
/// Declaring the audio device blocked status. By default, the audio device is considered as unbloked.
///
///
/// Available since API-level: 13
#[cfg(feature = "api-13")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_AudioDevice_BlockStatus(pub ::core::ffi::c_uint);
extern "C" {
    /// Query the device role of the target audio device descriptor.
    ///
    /// # Arguments
    ///
    /// * `audioDeviceDescriptor` - reference returned by [`OH_AudioRoutingManager_GetDevices`] or
    /// [`OH_AudioRouterManager_OnDeviceChangedCallback`].
    ///
    /// * `deviceRole` - the pointer [`OH_AudioDevice_DeviceRole`] variable that will be set the device role value.
    ///
    /// # Returns
    ///
    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`].
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_AudioDeviceDescriptor_GetDeviceRole(
        audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
        deviceRole: *mut OH_AudioDevice_Role,
    ) -> OH_AudioCommon_Result;
    /// Query the device type of the target audio device descriptor.
    ///
    /// # Arguments
    ///
    /// * `audioDeviceDescriptor` - reference returned by [`OH_AudioRoutingManager_GetDevices`] or
    /// [`OH_AudioRouterManager_OnDeviceChangedCallback`].
    ///
    /// * `deviceType` - the pointer [`OH_AudioDevice_DeviceType`]
    /// pointer variable that will be set the device type value.
    ///
    /// # Returns
    ///
    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`].
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_AudioDeviceDescriptor_GetDeviceType(
        audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
        deviceType: *mut OH_AudioDevice_Type,
    ) -> OH_AudioCommon_Result;
    /// Query the device id of the target audio device descriptor.
    ///
    /// # Arguments
    ///
    /// * `audioDeviceDescriptor` - reference returned by [`OH_AudioRoutingManager_GetDevices`] or
    /// [`OH_AudioRouterManager_OnDeviceChangedCallback`].
    ///
    /// * `id` - pointer variable that will be set the device id value.
    ///
    /// # Returns
    ///
    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`].
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_AudioDeviceDescriptor_GetDeviceId(
        audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
        id: *mut u32,
    ) -> OH_AudioCommon_Result;
    /// Query the device name of the target audio device descriptor.
    ///
    /// # Arguments
    ///
    /// * `audioDeviceDescriptor` - reference returned by [`OH_AudioRoutingManager_GetDevices`] or
    /// [`OH_AudioRouterManager_OnDeviceChangedCallback`].
    ///
    /// * `name` - pointer variable that will be set the device name value.
    /// Do not release the name pointer separately
    /// instead call [`OH_AudioRoutingManager_ReleaseDevices`] to release the DeviceDescriptor array
    /// when it is no use anymore.
    ///
    /// # Returns
    ///
    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`].
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_AudioDeviceDescriptor_GetDeviceName(
        audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
        name: *mut *mut ::core::ffi::c_char,
    ) -> OH_AudioCommon_Result;
    /// Query the device address of the target audio device descriptor.
    ///
    /// # Arguments
    ///
    /// * `audioDeviceDescriptor` - reference returned by [`OH_AudioRoutingManager_GetDevices`] or
    /// [`OH_AudioRouterManager_OnDeviceChangedCallback`].
    ///
    /// * `address` - pointer variable that will be set the device address value.
    /// Do not release the address pointer separately
    /// instead call [`OH_AudioRoutingManager_ReleaseDevices`] to release the DeviceDescriptor array
    /// when it is no use anymore.
    ///
    /// # Returns
    ///
    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`].
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_AudioDeviceDescriptor_GetDeviceAddress(
        audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
        address: *mut *mut ::core::ffi::c_char,
    ) -> OH_AudioCommon_Result;
    /// Query the sample rate array of the target audio device descriptor.
    ///
    /// # Arguments
    ///
    /// * `audioDeviceDescriptor` - reference returned by [`OH_AudioRoutingManager_GetDevices`] or
    /// [`OH_AudioRouterManager_OnDeviceChangedCallback`].
    ///
    /// * `sampleRates` - array pointer variable that will be set the sample rate array value.
    /// Do not release the sampleRates pointer separately
    /// instead call [`OH_AudioRoutingManager_ReleaseDevices`] to release the DeviceDescriptor array
    /// when it is no use anymore.
    ///
    /// * `size` - pointer variable that will be set the sample rate size value.
    ///
    /// # Returns
    ///
    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`].
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_AudioDeviceDescriptor_GetDeviceSampleRates(
        audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
        sampleRates: *mut *mut u32,
        size: *mut u32,
    ) -> OH_AudioCommon_Result;
    /// Query the device channel count array of the target audio device descriptor.
    ///
    /// # Arguments
    ///
    /// * `audioDeviceDescriptor` - reference returned by [`OH_AudioRoutingManager_GetDevices`] or
    /// [`OH_AudioRouterManager_OnDeviceChangedCallback`].
    ///
    /// * `channelCounts` - array pointer variable that will be set the channel count array value.
    /// Do not release the channelCounts pointer separately
    /// instead call [`OH_AudioRoutingManager_ReleaseDevices`] to release the DeviceDescriptor array
    /// when it is no use anymore.
    ///
    /// * `size` - pointer variable that will be set the channel count size value.
    ///
    /// # Returns
    ///
    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`].
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_AudioDeviceDescriptor_GetDeviceChannelCounts(
        audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
        channelCounts: *mut *mut u32,
        size: *mut u32,
    ) -> OH_AudioCommon_Result;
    /// Query the display name of the target audio device descriptor.
    ///
    /// # Arguments
    ///
    /// * `audioDeviceDescriptor` - reference returned by [`OH_AudioRoutingManager_GetDevices`] or
    /// [`OH_AudioRouterManager_OnDeviceChangedCallback`].
    ///
    /// * `displayName` - pointer variable that will be set the display name value.
    /// Do not release the displayName pointer separately
    /// instead call [`OH_AudioRoutingManager_ReleaseDevices`] to release the DeviceDescriptor array
    /// when it is no use anymore.
    ///
    /// # Returns
    ///
    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`].
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_AudioDeviceDescriptor_GetDeviceDisplayName(
        audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
        displayName: *mut *mut ::core::ffi::c_char,
    ) -> OH_AudioCommon_Result;
    /// Query the encoding type array of the target audio device descriptor.
    ///
    /// # Arguments
    ///
    /// * `audioDeviceDescriptor` - reference returned by [`OH_AudioRoutingManager_GetDevices`] or
    /// [`OH_AudioRouterManager_OnDeviceChangedCallback`].
    ///
    /// * `encodingTypes` - the [`OH_AudioStream_EncodingType`]
    /// Do not release the encodingTypes pointer separately
    /// instead call [`OH_AudioRoutingManager_ReleaseDevices`] to release the DeviceDescriptor array
    /// when it is no use anymore.
    ///
    /// * `size` - pointer variable that will be set the encoding type size value.
    ///
    /// # Returns
    ///
    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`].
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_AudioDeviceDescriptor_GetDeviceEncodingTypes(
        audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
        encodingTypes: *mut *mut OH_AudioStream_EncodingType,
        size: *mut u32,
    ) -> OH_AudioCommon_Result;
}