Skip to main content

OH_AudioDeviceDescriptor_GetDeviceDisplayName

Function OH_AudioDeviceDescriptor_GetDeviceDisplayName 

Source
pub unsafe extern "C" fn OH_AudioDeviceDescriptor_GetDeviceDisplayName(
    audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
    displayName: *mut *mut c_char,
) -> OH_AudioCommon_Result
Available on crate feature api-12 only.
Expand description

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