pub unsafe extern "C" fn OH_AudioSessionManager_SelectMediaInputDevice(
audioSessionManager: *mut OH_AudioSessionManager,
deviceDescriptor: *mut OH_AudioDeviceDescriptor,
) -> OH_AudioCommon_Resultapi-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
-
audioSessionManager- theOH_AudioSessionManagerhandle returned byOH_AudioManager_GetAudioSessionManager. -
deviceDescriptor- The target device. The available device must be in the array returned byOH_AudioSessionManager_GetAvailableDevices. When the nullptr is passed, system will clear the last selection.
§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