Skip to main content

OH_AudioDeviceDescriptor_GetDeviceSampleRates

Function OH_AudioDeviceDescriptor_GetDeviceSampleRates 

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

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