Skip to main content

OH_AudioSessionManager_SelectMediaInputDevice

Function OH_AudioSessionManager_SelectMediaInputDevice 

Source
pub unsafe extern "C" fn OH_AudioSessionManager_SelectMediaInputDevice(
    audioSessionManager: *mut OH_AudioSessionManager,
    deviceDescriptor: *mut OH_AudioDeviceDescriptor,
) -> OH_AudioCommon_Result
Available on crate features api-12 and api-21 only.
Expand description

Sets the media input device. This function is not valid for call recording, whose SourceType is SOURCE_TYPE_VOICE_CALL or SOURCE_TYPE_VOICE_COMMUNICATION. In scenarios where there are concurrent recording streams with higher priority, the actual input device used by the application may differ from the selected one. The application can use OH_AudioSessionManager_RegisterCurrentInputDeviceChangeCallback to register a callback to listen for the actual input device.

§Arguments

§Returns

  • [#AUDIOCOMMON_RESULT_SUCCESS] if execution succeeds. or [#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM] if parameter validation fails. or [#AUDIOCOMMON_RESULT_ERROR_SYSTEM] Audio client call audio service error, System error.

Available since API-level: 21