Skip to main content

ohaudio_sys/audio_session_manager/
audio_session_manager_ffi.rs

1// automatically generated by rust-bindgen 0.71.1
2
3#![allow(non_upper_case_globals)]
4#![allow(non_camel_case_types)]
5#![allow(non_snake_case)]
6use crate::audio_common::OH_AudioCommon_Result;
7#[cfg(feature = "api-21")]
8use crate::audio_device_base::{
9    OH_AudioDeviceDescriptor, OH_AudioDevice_ChangeType, OH_AudioDevice_Usage,
10};
11#[cfg(feature = "api-20")]
12use crate::audio_device_base::{OH_AudioDeviceDescriptorArray, OH_AudioDevice_Type};
13#[cfg(feature = "api-20")]
14use crate::audiostream_base::OH_AudioStream_DeviceChangeReason;
15
16/// Declare the audio session manager.
17/// The handle of audio session manager is used for audio session related functions.
18///
19///
20/// Available since API-level: 12
21#[cfg(feature = "api-12")]
22#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
23#[repr(C)]
24pub struct OH_AudioSessionManager {
25    _unused: [u8; 0],
26}
27#[cfg(feature = "api-12")]
28#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
29impl OH_AudioSession_ConcurrencyMode {
30    /// default mode
31    pub const CONCURRENCY_DEFAULT: OH_AudioSession_ConcurrencyMode =
32        OH_AudioSession_ConcurrencyMode(0);
33    /// mix with others mode
34    pub const CONCURRENCY_MIX_WITH_OTHERS: OH_AudioSession_ConcurrencyMode =
35        OH_AudioSession_ConcurrencyMode(1);
36    /// duck others mode
37    pub const CONCURRENCY_DUCK_OTHERS: OH_AudioSession_ConcurrencyMode =
38        OH_AudioSession_ConcurrencyMode(2);
39    /// pause others mode
40    pub const CONCURRENCY_PAUSE_OTHERS: OH_AudioSession_ConcurrencyMode =
41        OH_AudioSession_ConcurrencyMode(3);
42}
43#[repr(transparent)]
44/// Declare the audio concurrency modes.
45///
46///
47/// Available since API-level: 12
48#[cfg(feature = "api-12")]
49#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
50#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
51pub struct OH_AudioSession_ConcurrencyMode(pub ::core::ffi::c_uint);
52#[cfg(feature = "api-20")]
53#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
54impl OH_AudioSession_Scene {
55    /// scene for media
56    pub const AUDIO_SESSION_SCENE_MEDIA: OH_AudioSession_Scene = OH_AudioSession_Scene(0);
57    /// scene for game
58    pub const AUDIO_SESSION_SCENE_GAME: OH_AudioSession_Scene = OH_AudioSession_Scene(1);
59    /// scene for voice communication
60    pub const AUDIO_SESSION_SCENE_VOICE_COMMUNICATION: OH_AudioSession_Scene =
61        OH_AudioSession_Scene(2);
62}
63#[repr(transparent)]
64/// Declare the audio session scene.
65///
66///
67/// Available since API-level: 20
68#[cfg(feature = "api-20")]
69#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
70#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
71pub struct OH_AudioSession_Scene(pub ::core::ffi::c_uint);
72#[cfg(feature = "api-20")]
73#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
74impl OH_AudioSession_StateChangeHint {
75    /// Resume the playback
76    pub const AUDIO_SESSION_STATE_CHANGE_HINT_RESUME: OH_AudioSession_StateChangeHint =
77        OH_AudioSession_StateChangeHint(0);
78    /// paused/pause the playback
79    pub const AUDIO_SESSION_STATE_CHANGE_HINT_PAUSE: OH_AudioSession_StateChangeHint =
80        OH_AudioSession_StateChangeHint(1);
81    /// stopped/stop the playback.
82    pub const AUDIO_SESSION_STATE_CHANGE_HINT_STOP: OH_AudioSession_StateChangeHint =
83        OH_AudioSession_StateChangeHint(2);
84    /// stopped/stop the playback due to no audio stream for a long time.
85    pub const AUDIO_SESSION_STATE_CHANGE_HINT_TIME_OUT_STOP: OH_AudioSession_StateChangeHint =
86        OH_AudioSession_StateChangeHint(3);
87    /// Ducked the playback. (In ducking, the audio volume is reduced, but not silenced.)
88    pub const AUDIO_SESSION_STATE_CHANGE_HINT_DUCK: OH_AudioSession_StateChangeHint =
89        OH_AudioSession_StateChangeHint(4);
90    /// Unducked the playback.
91    pub const AUDIO_SESSION_STATE_CHANGE_HINT_UNDUCK: OH_AudioSession_StateChangeHint =
92        OH_AudioSession_StateChangeHint(5);
93    /// Suggests to mute the playback because there is another application begin to play nonmixable
94    /// audio, application can decide whether to mute.
95    /// If interrupt strategy is duck, [`#AUDIO_SESSION_STATE_CHANGE_HINT_DUCK`] will replace mute suggestion event,
96    /// but application can still decide to mute when receive hint duck.
97    ///
98    ///
99    /// Available since API-level: 23
100    #[cfg(feature = "api-23")]
101    #[cfg_attr(docsrs, doc(cfg(feature = "api-23")))]
102    pub const AUDIO_SESSION_STATE_CHANGE_HINT_MUTE_SUGGESTION: OH_AudioSession_StateChangeHint =
103        OH_AudioSession_StateChangeHint(6);
104    /// Suggest to unmute the playback because another application's nonmixable audio ends,
105    /// application can decide whether to mute.
106    /// If interrupt strategy is unduck, [`#AUDIO_SESSION_STATE_CHANGE_HINT_UNDUCK`] will replace unmute
107    /// suggestion event, but application can still decide to unmute when receive hint unduck.
108    ///
109    ///
110    /// Available since API-level: 23
111    #[cfg(feature = "api-23")]
112    #[cfg_attr(docsrs, doc(cfg(feature = "api-23")))]
113    pub const AUDIO_SESSION_STATE_CHANGE_HINT_UNMUTE_SUGGESTION: OH_AudioSession_StateChangeHint =
114        OH_AudioSession_StateChangeHint(7);
115}
116#[repr(transparent)]
117/// Declare the audio session state change hints.
118///
119///
120/// Available since API-level: 20
121#[cfg(feature = "api-20")]
122#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
123#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
124pub struct OH_AudioSession_StateChangeHint(pub ::core::ffi::c_uint);
125#[cfg(feature = "api-20")]
126#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
127impl OH_AudioSession_OutputDeviceChangeRecommendedAction {
128    /// Recommend to continue the playback.
129    pub const DEVICE_CHANGE_RECOMMEND_TO_CONTINUE:
130        OH_AudioSession_OutputDeviceChangeRecommendedAction =
131        OH_AudioSession_OutputDeviceChangeRecommendedAction(0);
132    /// recommend to stop the playback.
133    pub const DEVICE_CHANGE_RECOMMEND_TO_STOP: OH_AudioSession_OutputDeviceChangeRecommendedAction =
134        OH_AudioSession_OutputDeviceChangeRecommendedAction(1);
135}
136#[repr(transparent)]
137/// Declare the recommend action when device change.
138///
139///
140/// Available since API-level: 20
141#[cfg(feature = "api-20")]
142#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
143#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
144pub struct OH_AudioSession_OutputDeviceChangeRecommendedAction(pub ::core::ffi::c_uint);
145#[cfg(feature = "api-12")]
146#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
147impl OH_AudioSession_DeactivatedReason {
148    /// deactivated because of lower priority
149    pub const DEACTIVATED_LOWER_PRIORITY: OH_AudioSession_DeactivatedReason =
150        OH_AudioSession_DeactivatedReason(0);
151    /// deactivated because of timing out
152    pub const DEACTIVATED_TIMEOUT: OH_AudioSession_DeactivatedReason =
153        OH_AudioSession_DeactivatedReason(1);
154}
155#[repr(transparent)]
156/// Declare the audio deactivated reasons.
157///
158///
159/// Available since API-level: 12
160#[cfg(feature = "api-12")]
161#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
162#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
163pub struct OH_AudioSession_DeactivatedReason(pub ::core::ffi::c_uint);
164#[cfg(feature = "api-21")]
165#[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
166impl OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory {
167    /// Not prefer to use bluetooth and nearlink record.
168    pub const PREFERRED_NONE: OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory =
169        OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory(0);
170    /// Prefer to use bluetooth and nearlink record.
171    /// However, whether to use low latency or high quality recording
172    /// depends on system.
173    pub const PREFERRED_DEFAULT: OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory =
174        OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory(1);
175    /// Prefer to use bluetooth and nearlink low latency mode to record.
176    pub const PREFERRED_LOW_LATENCY: OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory =
177        OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory(2);
178    /// Prefer to use bluetooth and nearlink high quality mode to record.
179    pub const PREFERRED_HIGH_QUALITY: OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory =
180        OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory(3);
181}
182#[repr(transparent)]
183/// Enumerates the categories application prefer to use
184/// when recording with bluetooth and nearlink.
185///
186///
187/// Available since API-level: 21
188#[cfg(feature = "api-21")]
189#[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
190#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
191pub struct OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory(pub ::core::ffi::c_uint);
192/// declare the audio session strategy
193///
194///
195/// Available since API-level: 12
196#[cfg(feature = "api-12")]
197#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
198#[repr(C)]
199#[derive(Debug, Copy, Clone)]
200pub struct OH_AudioSession_Strategy {
201    /// audio session concurrency mode
202    pub concurrencyMode: OH_AudioSession_ConcurrencyMode,
203}
204/// declare the audio session deactivated event
205///
206///
207/// Available since API-level: 12
208#[cfg(feature = "api-12")]
209#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
210#[repr(C)]
211#[derive(Debug, Copy, Clone)]
212pub struct OH_AudioSession_DeactivatedEvent {
213    /// audio session deactivated reason
214    pub reason: OH_AudioSession_DeactivatedReason,
215}
216/// declare the audio session state change event
217///
218///
219/// Available since API-level: 20
220#[cfg(feature = "api-20")]
221#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
222#[repr(C)]
223#[derive(Debug, Copy, Clone)]
224pub struct OH_AudioSession_StateChangedEvent {
225    /// audio session state change hints.
226    pub stateChangeHint: OH_AudioSession_StateChangeHint,
227}
228/// This function pointer will point to the callback function that
229/// is used to return the audio session state change event.
230///
231/// # Arguments
232///
233/// * `event` - the [`#OH_AudioSession_StateChangedEvent`] state change triggering event.
234///
235/// Available since API-level: 20
236#[cfg(feature = "api-20")]
237#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
238pub type OH_AudioSession_StateChangedCallback =
239    ::core::option::Option<unsafe extern "C" fn(event: OH_AudioSession_StateChangedEvent)>;
240/// This function pointer will point to the callback function that
241/// is used to return the changing audio device descriptors.
242/// There may be more than one audio device descriptor returned.
243///
244/// # Arguments
245///
246/// * `type` - the [`OH_AudioDevice_ChangeType`] is connect or disconnect.
247///
248/// * `audioDeviceDescriptorArray` - the [`OH_AudioDeviceDescriptorArray`]
249/// pointer variable which will be set the audio device descriptors value.
250/// Do not release the audioDeviceDescriptorArray pointer separately
251/// instead call [`OH_AudioSessionManager_ReleaseDevices`] to release the DeviceDescriptor array
252/// when it is no use anymore.
253///
254/// Available since API-level: 21
255#[cfg(feature = "api-21")]
256#[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
257pub type OH_AudioSession_AvailableDeviceChangedCallback = ::core::option::Option<
258    unsafe extern "C" fn(
259        type_: OH_AudioDevice_ChangeType,
260        audioDeviceDescriptorArray: *mut OH_AudioDeviceDescriptorArray,
261    ),
262>;
263/// This function pointer will point to the callback function that
264/// is used to return the audio session input device change event.
265///
266/// # Arguments
267///
268/// * `audioDeviceDescriptorArray` - the [`OH_AudioDeviceDescriptorArray`]
269/// pointer variable which will be set the audio input device descriptors value.
270/// Do not release the audioDeviceDescriptorArray pointer separately
271/// instead call [`OH_AudioSessionManager_ReleaseDevices`]
272/// to release the DeviceDescriptor array when it is no use anymore.
273///
274/// * `changeReason` - the [`#OH_AudioStream_DeviceChangeReason`] indicates
275/// that why does the input device changes.
276///
277/// Available since API-level: 21
278#[cfg(feature = "api-21")]
279#[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
280pub type OH_AudioSession_CurrentInputDeviceChangedCallback = ::core::option::Option<
281    unsafe extern "C" fn(
282        devices: *mut OH_AudioDeviceDescriptorArray,
283        changeReason: OH_AudioStream_DeviceChangeReason,
284    ),
285>;
286/// This function pointer will point to the callback function that
287/// is used to return the audio session device change event.
288///
289/// # Arguments
290///
291/// * `audioDeviceDescriptorArray` - the [`OH_AudioDeviceDescriptorArray`]
292/// pointer variable which will be set the audio device descriptors value.
293/// Do not release the audioDeviceDescriptorArray pointer separately
294/// instead call [`OH_AudioSessionManager_ReleaseDevices`]
295/// to release the DeviceDescriptor array when it is no use anymore.
296///
297/// * `changeReason` - the [`#OH_AudioStream_DeviceChangeReason`] indicates that why does the device changes.
298///
299/// * `recommendedAction` - the [`#OH_AudioSession_OutputDeviceChangeRecommendedAction`]
300/// recommend action when device change.
301///
302/// Available since API-level: 20
303#[cfg(feature = "api-20")]
304#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
305pub type OH_AudioSession_CurrentOutputDeviceChangedCallback = ::core::option::Option<
306    unsafe extern "C" fn(
307        devices: *mut OH_AudioDeviceDescriptorArray,
308        changeReason: OH_AudioStream_DeviceChangeReason,
309        recommendedAction: OH_AudioSession_OutputDeviceChangeRecommendedAction,
310    ),
311>;
312/// This function pointer will point to the callback function that
313/// is used to return the audio session deactivated event.
314///
315/// # Arguments
316///
317/// * `event` - the [`#OH_AudioSession_DeactivatedEvent`] deactivated triggering event.
318///
319/// Available since API-level: 12
320#[cfg(feature = "api-12")]
321#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
322pub type OH_AudioSession_DeactivatedCallback =
323    ::core::option::Option<unsafe extern "C" fn(event: OH_AudioSession_DeactivatedEvent) -> i32>;
324extern "C" {
325    /// Fetch the audio session manager handle.
326    /// The audio session manager handle should be the first parameter in audio session related functions
327    ///
328    /// # Arguments
329    ///
330    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
331    /// which will be returned as the output parameter
332    ///
333    /// # Returns
334    ///
335    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds
336    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] if system state error
337    ///
338    /// Available since API-level: 12
339    #[cfg(feature = "api-12")]
340    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
341    pub fn OH_AudioManager_GetAudioSessionManager(
342        audioSessionManager: *mut *mut OH_AudioSessionManager,
343    ) -> OH_AudioCommon_Result;
344    /// Activate the audio session for the current pid application.
345    /// If [`#OH_AudioSessionManager_SetScene`] is called, it will take focus when calling this method.
346    ///
347    /// # Arguments
348    ///
349    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
350    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
351    ///
352    /// * `strategy` - pointer of [`#OH_AudioSession_Strategy`]
353    /// which is used for setting audio session strategy
354    ///
355    /// # Returns
356    ///
357    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds
358    /// or [`#AUDIOCOMMON_REULT_INVALID_PARAM`] if parameter validation fails
359    /// or [`#AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE`] if system illegal state
360    ///
361    /// Available since API-level: 12
362    #[cfg(feature = "api-12")]
363    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
364    pub fn OH_AudioSessionManager_ActivateAudioSession(
365        audioSessionManager: *mut OH_AudioSessionManager,
366        strategy: *const OH_AudioSession_Strategy,
367    ) -> OH_AudioCommon_Result;
368    /// Deactivate the audio session for the current pid application.
369    ///
370    /// # Arguments
371    ///
372    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
373    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
374    ///
375    /// # Returns
376    ///
377    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds
378    /// or [`#AUDIOCOMMON_REULT_INVALID_PARAM`] if parameter validation fails
379    /// or [`#AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE`] if system illegal state
380    ///
381    /// Available since API-level: 12
382    #[cfg(feature = "api-12")]
383    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
384    pub fn OH_AudioSessionManager_DeactivateAudioSession(
385        audioSessionManager: *mut OH_AudioSessionManager,
386    ) -> OH_AudioCommon_Result;
387    /// Querying whether the current pid application has an activated audio session.
388    ///
389    /// # Arguments
390    ///
391    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
392    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
393    ///
394    /// # Returns
395    ///
396    /// * True when the current pid application has an activated audio session
397    /// False when it does not
398    ///
399    /// Available since API-level: 12
400    #[cfg(feature = "api-12")]
401    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
402    pub fn OH_AudioSessionManager_IsAudioSessionActivated(
403        audioSessionManager: *mut OH_AudioSessionManager,
404    ) -> bool;
405    /// Register the audio session deactivated event callback.
406    ///
407    /// # Arguments
408    ///
409    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
410    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
411    ///
412    /// * `callback` - the [`#OH_AudioSession_DeactivatedCallback`] which is used
413    /// to receive the deactivated event
414    ///
415    /// # Returns
416    ///
417    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds
418    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails
419    ///
420    /// Available since API-level: 12
421    #[cfg(feature = "api-12")]
422    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
423    pub fn OH_AudioSessionManager_RegisterSessionDeactivatedCallback(
424        audioSessionManager: *mut OH_AudioSessionManager,
425        callback: OH_AudioSession_DeactivatedCallback,
426    ) -> OH_AudioCommon_Result;
427    /// Unregister the audio session deactivated event callback.
428    ///
429    /// # Arguments
430    ///
431    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
432    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
433    ///
434    /// * `callback` - the [`#OH_AudioSession_DeactivatedCallback`] which is used
435    /// to receive the deactivated event
436    ///
437    /// # Returns
438    ///
439    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds
440    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails
441    ///
442    /// Available since API-level: 12
443    #[cfg(feature = "api-12")]
444    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
445    pub fn OH_AudioSessionManager_UnregisterSessionDeactivatedCallback(
446        audioSessionManager: *mut OH_AudioSessionManager,
447        callback: OH_AudioSession_DeactivatedCallback,
448    ) -> OH_AudioCommon_Result;
449    /// Set scene for audio session.
450    ///
451    /// # Arguments
452    ///
453    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
454    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
455    ///
456    /// * `scene` - the [`#OH_AudioSession_Scene`]
457    ///
458    /// # Returns
459    ///
460    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds
461    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails
462    /// or [`#AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE`] if system illegal state
463    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] if system state error
464    ///
465    /// Available since API-level: 20
466    #[cfg(feature = "api-20")]
467    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
468    pub fn OH_AudioSessionManager_SetScene(
469        audioSessionManager: *mut OH_AudioSessionManager,
470        scene: OH_AudioSession_Scene,
471    ) -> OH_AudioCommon_Result;
472    /// Register the audio session state change event callback.
473    ///
474    /// # Arguments
475    ///
476    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
477    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
478    ///
479    /// * `callback` - the [`#OH_AudioSession_StateChangedCallback`] which is used
480    /// to receive the state change event
481    ///
482    /// # Returns
483    ///
484    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds
485    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails
486    /// or [`AUDIOCOMMON_RESULT_ERROR_NO_MEMORY`] No memory error
487    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] if system state error
488    ///
489    /// Available since API-level: 20
490    #[cfg(feature = "api-20")]
491    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
492    pub fn OH_AudioSessionManager_RegisterStateChangeCallback(
493        audioSessionManager: *mut OH_AudioSessionManager,
494        callback: OH_AudioSession_StateChangedCallback,
495    ) -> OH_AudioCommon_Result;
496    /// Unregister the audio session state change event callback.
497    ///
498    /// # Arguments
499    ///
500    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
501    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
502    ///
503    /// * `callback` - the [`#OH_AudioSession_StateChangedCallback`] which is used
504    /// to receive the state change event
505    ///
506    /// # Returns
507    ///
508    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds
509    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails
510    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] if system state error
511    ///
512    /// Available since API-level: 20
513    #[cfg(feature = "api-20")]
514    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
515    pub fn OH_AudioSessionManager_UnregisterStateChangeCallback(
516        audioSessionManager: *mut OH_AudioSessionManager,
517        callback: OH_AudioSession_StateChangedCallback,
518    ) -> OH_AudioCommon_Result;
519    /// Sets the default output device.
520    /// This function applys on audiorenderers whose StreamUsage are
521    /// STREAM_USAGE_VOICE_COMMUNICATION/STREAM_USAGE_VIDEO_COMMUNICATION/STREAM_USAGE_VOICE_MESSAGE.
522    /// Setting the device will only takes effect if no other accessory such as headphones are in use
523    /// # Arguments
524    ///
525    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
526    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
527    ///
528    /// * `deviceType` - The target device. The available deviceTypes are:
529    /// EARPIECE: Built-in earpiece
530    /// SPEAKER: Built-in speaker
531    /// DEFAULT: System default output device
532    ///
533    /// # Returns
534    ///
535    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds
536    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails
537    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] if system state error
538    ///
539    /// Available since API-level: 20
540    #[cfg(feature = "api-20")]
541    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
542    pub fn OH_AudioSessionManager_SetDefaultOutputDevice(
543        audioSessionManager: *mut OH_AudioSessionManager,
544        deviceType: OH_AudioDevice_Type,
545    ) -> OH_AudioCommon_Result;
546    /// Gets the default output device.
547    ///
548    /// # Arguments
549    ///
550    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
551    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
552    ///
553    /// * `deviceType` - The target device.The available deviceTypes are:
554    /// EARPIECE: Built-in earpiece
555    /// SPEAKER: Built-in speaker
556    /// DEFAULT: System default output device
557    ///
558    /// # Returns
559    ///
560    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds
561    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails
562    /// or [`#AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE`] if system illegal state
563    ///
564    /// Available since API-level: 20
565    #[cfg(feature = "api-20")]
566    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
567    pub fn OH_AudioSessionManager_GetDefaultOutputDevice(
568        audioSessionManager: *mut OH_AudioSessionManager,
569        deviceType: *mut OH_AudioDevice_Type,
570    ) -> OH_AudioCommon_Result;
571    /// Release the audio device descriptor array object.
572    ///
573    /// # Arguments
574    ///
575    /// * `audioSessionManager` - the [`OH_AudioSessionManager`]
576    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
577    ///
578    /// * `audioDeviceDescriptorArray` - Audio device descriptors should be released.
579    ///
580    /// # Returns
581    ///
582    /// * [`AUDIOCOMMON_RESULT_SUCCESS`] If the execution is successful.
583    /// or [`AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails
584    /// 1.The param of audioSessionManager is nullptr;
585    /// 2.The param of audioDeviceDescriptorArray is nullptr.
586    ///
587    /// Available since API-level: 20
588    #[cfg(feature = "api-20")]
589    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
590    pub fn OH_AudioSessionManager_ReleaseDevices(
591        audioSessionManager: *mut OH_AudioSessionManager,
592        audioDeviceDescriptorArray: *mut OH_AudioDeviceDescriptorArray,
593    ) -> OH_AudioCommon_Result;
594    /// Register the audio session device change event callback.
595    ///
596    /// # Arguments
597    ///
598    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
599    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
600    ///
601    /// * `callback` - the [`#OH_AudioSession_CurrentOutputDeviceChangedCallback`] which is used
602    /// to receive the device change event
603    ///
604    /// # Returns
605    ///
606    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds
607    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails
608    /// or [`AUDIOCOMMON_RESULT_ERROR_NO_MEMORY`] No memory error
609    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] if system state error
610    ///
611    /// Available since API-level: 20
612    #[cfg(feature = "api-20")]
613    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
614    pub fn OH_AudioSessionManager_RegisterCurrentOutputDeviceChangeCallback(
615        audioSessionManager: *mut OH_AudioSessionManager,
616        callback: OH_AudioSession_CurrentOutputDeviceChangedCallback,
617    ) -> OH_AudioCommon_Result;
618    /// Unregister the audio session device change event callback.
619    ///
620    /// # Arguments
621    ///
622    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
623    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
624    ///
625    /// * `callback` - the [`#OH_AudioSession_CurrentOutputDeviceChangedCallback`] which is used
626    /// to receive the device change event
627    ///
628    /// # Returns
629    ///
630    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds
631    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails
632    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] if system state error
633    ///
634    /// Available since API-level: 20
635    #[cfg(feature = "api-20")]
636    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
637    pub fn OH_AudioSessionManager_UnregisterCurrentOutputDeviceChangeCallback(
638        audioSessionManager: *mut OH_AudioSessionManager,
639        callback: OH_AudioSession_CurrentOutputDeviceChangedCallback,
640    ) -> OH_AudioCommon_Result;
641    /// Get available devices by device usage.
642    ///
643    /// # Arguments
644    ///
645    /// * `audioSessionManager` - the [`OH_AudioSessionManager`] handle returned
646    /// by [`OH_AudioManager_GetAudioSessionManager`].
647    ///
648    /// * `deviceUsage` - the [`OH_AudioDevice_Usage`] which is used as
649    /// the filter parameter for get the available devices.
650    ///
651    /// * `audioDeviceDescriptorArray` - the [`OH_AudioDeviceDescriptorArray`]
652    /// pointer variable which will be set the audio device descriptors value
653    /// Do not release the audioDeviceDescriptorArray pointer separately
654    /// instead call [`OH_AudioSessionManager_ReleaseDevices`] to release the DeviceDescriptor array
655    /// when it is no use anymore.
656    ///
657    /// # Returns
658    ///
659    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds.
660    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails.
661    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] Audio client call audio service error, System error.
662    ///
663    /// Available since API-level: 21
664    #[cfg(feature = "api-21")]
665    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
666    pub fn OH_AudioSessionManager_GetAvailableDevices(
667        audioSessionManager: *mut OH_AudioSessionManager,
668        deviceUsage: OH_AudioDevice_Usage,
669        audioDeviceDescriptorArray: *mut *mut OH_AudioDeviceDescriptorArray,
670    ) -> OH_AudioCommon_Result;
671    /// Register available device change event callback.
672    ///
673    /// # Arguments
674    ///
675    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
676    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
677    ///
678    /// * `deviceUsage` - the [`OH_AudioDevice_Usage`] which is used as
679    /// the filter parameter for register the available devices change event.
680    ///
681    /// * `callback` - the [`#OH_AudioSession_AvailableDeviceChangedCallback`] which is used
682    /// to receive available device change event.
683    ///
684    /// # Returns
685    ///
686    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds.
687    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails.
688    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] Audio client call audio service error, System error.
689    ///
690    /// Available since API-level: 21
691    #[cfg(feature = "api-21")]
692    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
693    pub fn OH_AudioSessionManager_RegisterAvailableDevicesChangeCallback(
694        audioSessionManager: *mut OH_AudioSessionManager,
695        deviceUsage: OH_AudioDevice_Usage,
696        callback: OH_AudioSession_AvailableDeviceChangedCallback,
697    ) -> OH_AudioCommon_Result;
698    /// Unregister available device change event callback.
699    ///
700    /// # Arguments
701    ///
702    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
703    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`].
704    ///
705    /// * `callback` - the [`#OH_AudioSession_AvailableDeviceChangedCallback`] which is used
706    /// to receive the device change event.
707    ///
708    /// # Returns
709    ///
710    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds.
711    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails.
712    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] Audio client call audio service error, System error.
713    ///
714    /// Available since API-level: 21
715    #[cfg(feature = "api-21")]
716    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
717    pub fn OH_AudioSessionManager_UnregisterAvailableDevicesChangeCallback(
718        audioSessionManager: *mut OH_AudioSessionManager,
719        callback: OH_AudioSession_AvailableDeviceChangedCallback,
720    ) -> OH_AudioCommon_Result;
721    /// Sets the media input device.
722    /// This function is not valid for call recording, whose SourceType is
723    /// SOURCE_TYPE_VOICE_CALL or SOURCE_TYPE_VOICE_COMMUNICATION.
724    /// In scenarios where there are concurrent recording streams with higher priority,
725    /// the actual input device used by the application may differ from the selected one.
726    /// The application can use [`OH_AudioSessionManager_RegisterCurrentInputDeviceChangeCallback`]
727    /// to register a callback to listen for the actual input device.
728    ///
729    /// # Arguments
730    ///
731    /// * `audioSessionManager` - the [`OH_AudioSessionManager`] handle returned
732    /// by [`OH_AudioManager_GetAudioSessionManager`].
733    ///
734    /// * `deviceDescriptor` - The target device. The available device must be in the array returned
735    /// by [`OH_AudioSessionManager_GetAvailableDevices`].
736    /// When the nullptr is passed, system will clear the last selection.
737    ///
738    /// # Returns
739    ///
740    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds.
741    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails.
742    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] Audio client call audio service error, System error.
743    ///
744    /// Available since API-level: 21
745    #[cfg(feature = "api-21")]
746    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
747    pub fn OH_AudioSessionManager_SelectMediaInputDevice(
748        audioSessionManager: *mut OH_AudioSessionManager,
749        deviceDescriptor: *mut OH_AudioDeviceDescriptor,
750    ) -> OH_AudioCommon_Result;
751    /// Gets the selected media input device.
752    ///
753    /// # Arguments
754    ///
755    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
756    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`].
757    ///
758    /// * `audioDeviceDescriptor` - The target device set by
759    /// [`OH_AudioSessionManager_SelectMediaInputDevice`] or
760    /// device with AUDIO_DEVICE_TYPE_INVALID if not set yet.
761    /// Do not release the audioDeviceDescriptor pointer separately,
762    /// instead call [`OH_AudioSessionManager_ReleaseDevice`] to release it
763    /// when it is no use anymore.
764    ///
765    /// # Returns
766    ///
767    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds.
768    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails.
769    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] Audio client call audio service error, System error.
770    ///
771    /// Available since API-level: 21
772    #[cfg(feature = "api-21")]
773    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
774    pub fn OH_AudioSessionManager_GetSelectedMediaInputDevice(
775        audioSessionManager: *mut OH_AudioSessionManager,
776        audioDeviceDescriptor: *mut *mut OH_AudioDeviceDescriptor,
777    ) -> OH_AudioCommon_Result;
778    /// Sets the prefered record category with bluetooth and nearlink device.
779    /// The application can set this category before bluetooth and nearlink connected, and the system will
780    /// prefer to use bluetooth and nearlink to record when the device connected.
781    /// In scenarios where there are concurrent recording streams with higher priority,
782    /// the actual input device used by the application may differ from the prefered one.
783    /// The application can use [`OH_AudioSessionManager_RegisterCurrentInputDeviceChangeCallback`]
784    /// to register a callback to listen for the actual input device.
785    ///
786    /// # Arguments
787    ///
788    /// * `audioSessionManager` - the [`OH_AudioSessionManager`] handle returned
789    /// by [`OH_AudioManager_GetAudioSessionManager`].
790    ///
791    /// * `category` - The category application prefer to use when recording with bluetooth and nearlink.
792    ///
793    /// # Returns
794    ///
795    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds.
796    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails.
797    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] Audio client call audio service error, System error.
798    ///
799    /// Available since API-level: 21
800    #[cfg(feature = "api-21")]
801    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
802    pub fn OH_AudioSessionManager_SetBluetoothAndNearlinkPreferredRecordCategory(
803        audioSessionManager: *mut OH_AudioSessionManager,
804        category: OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory,
805    ) -> OH_AudioCommon_Result;
806    /// Gets the prefered record category with bluetooth and nearlink device.
807    ///
808    /// # Arguments
809    ///
810    /// * `audioSessionManager` - the [`OH_AudioSessionManager`] handle returned
811    /// by [`OH_AudioManager_GetAudioSessionManager`].
812    ///
813    /// * `category` - The category application prefer to use when recording with bluetooth and nearlink.
814    ///
815    /// # Returns
816    ///
817    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds.
818    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails.
819    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] Audio client call audio service error, System error.
820    ///
821    /// Available since API-level: 21
822    #[cfg(feature = "api-21")]
823    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
824    pub fn OH_AudioSessionManager_GetBluetoothAndNearlinkPreferredRecordCategory(
825        audioSessionManager: *mut OH_AudioSessionManager,
826        category: *mut OH_AudioSession_BluetoothAndNearlinkPreferredRecordCategory,
827    ) -> OH_AudioCommon_Result;
828    /// Register the audio session input device change event callback.
829    ///
830    /// # Arguments
831    ///
832    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
833    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`].
834    ///
835    /// * `callback` - the [`#OH_AudioSession_CurrentInputDeviceChangedCallback`] which is used
836    /// to receive the input device change event.
837    ///
838    /// # Returns
839    ///
840    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds.
841    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails.
842    /// or [`AUDIOCOMMON_RESULT_ERROR_NO_MEMORY`] No memory error.
843    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] Audio client call audio service error, System error.
844    ///
845    /// Available since API-level: 21
846    #[cfg(feature = "api-21")]
847    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
848    pub fn OH_AudioSessionManager_RegisterCurrentInputDeviceChangeCallback(
849        audioSessionManager: *mut OH_AudioSessionManager,
850        callback: OH_AudioSession_CurrentInputDeviceChangedCallback,
851    ) -> OH_AudioCommon_Result;
852    /// Unregister the audio session input device change event callback.
853    ///
854    /// # Arguments
855    ///
856    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
857    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`].
858    ///
859    /// * `callback` - the [`#OH_AudioSession_CurrentInputDeviceChangedCallback`] which is used
860    /// to receive the input device change event.
861    ///
862    /// # Returns
863    ///
864    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] if execution succeeds.
865    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails.
866    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] Audio client call audio service error, System error.
867    ///
868    /// Available since API-level: 21
869    #[cfg(feature = "api-21")]
870    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
871    pub fn OH_AudioSessionManager_UnregisterCurrentInputDeviceChangeCallback(
872        audioSessionManager: *mut OH_AudioSessionManager,
873        callback: OH_AudioSession_CurrentInputDeviceChangedCallback,
874    ) -> OH_AudioCommon_Result;
875    /// Release the audio device descriptor object.
876    ///
877    /// # Arguments
878    ///
879    /// * `audioSessionManager` - the [`OH_AudioSessionManager`]
880    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`]
881    ///
882    /// * `audioDeviceDescriptor` - Audio device descriptor to release.
883    ///
884    /// # Returns
885    ///
886    /// * [`AUDIOCOMMON_RESULT_SUCCESS`] If the execution is successful.
887    /// or [`AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] if parameter validation fails
888    ///
889    /// Available since API-level: 21
890    #[cfg(feature = "api-21")]
891    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
892    pub fn OH_AudioSessionManager_ReleaseDevice(
893        audioSessionManager: *mut OH_AudioSessionManager,
894        audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
895    ) -> OH_AudioCommon_Result;
896    /// Enables mute suggestion callback function when using [`#CONCURRENCY_MIX_WITH_OTHERS`] mode.
897    /// Usually when using mix mode, application won't receive state change event when there is another audio playing
898    /// simultaneously. But in some scenarios, like game or radio, the application may intend to mute its audio to
899    /// achieve better user experience.
900    /// If enabled, the mute and unmute suggestion hint will be sent by [`#OH_AudioSession_StateChangedCallback`]
901    /// registered by [`#OH_AudioSessionManager_RegisterStateChangeCallback`]. Mute suggestion means there is
902    /// another application starting non-mixable audio.
903    /// This function only supports audio session with [`#OH_AudioSession_Scene`] set and activated with
904    /// [`#CONCURRENCY_MIX_WITH_OTHERS`] mode. And it takes effect only once during activation, so application
905    /// need to enable it every time before activation.
906    ///
907    /// # Arguments
908    ///
909    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
910    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`].
911    ///
912    /// * `enable` - Sets true to enable mute suggestion while registering session state change event callback.
913    ///
914    /// # Returns
915    ///
916    /// * [`#AUDIOCOMMON_RESULT_SUCCESS`] If the execution is successful.
917    /// or [`#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM`] Parameter validation fails.
918    /// or [`#AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE`] Function is called without setting
919    /// [`#OH_AudioSession_Scene`] or called after audio session activation.
920    /// or [`#AUDIOCOMMON_RESULT_ERROR_SYSTEM`] Audio client call audio service error, system internal error.
921    ///
922    /// Available since API-level: 23
923    #[cfg(feature = "api-23")]
924    #[cfg_attr(docsrs, doc(cfg(feature = "api-23")))]
925    pub fn OH_AudioSessionManager_EnableMuteSuggestionWhenMixWithOthers(
926        audioSessionManager: *mut OH_AudioSessionManager,
927        enable: bool,
928    ) -> OH_AudioCommon_Result;
929    /// Returns if there is any other application playing audio in media usage, including media session activated.
930    ///
931    /// # Arguments
932    ///
933    /// * `audioSessionManager` - the [`#OH_AudioSessionManager`]
934    /// returned by the [`#OH_AudioManager_GetAudioSessionManager`].
935    ///
936    /// # Returns
937    ///
938    /// * True if there is other application playing audio in media usage.
939    ///
940    /// Available since API-level: 23
941    #[cfg(feature = "api-23")]
942    #[cfg_attr(docsrs, doc(cfg(feature = "api-23")))]
943    pub fn OH_AudioSessionManager_IsOtherMediaPlaying(
944        audioSessionManager: *mut OH_AudioSessionManager,
945    ) -> bool;
946}