Skip to main content

OH_AudioSessionManager_RegisterCurrentInputDeviceChangeCallback

Function OH_AudioSessionManager_RegisterCurrentInputDeviceChangeCallback 

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

Register the audio session input device change event callback.

§Arguments

  • audioSessionManager - the [#OH_AudioSessionManager] returned by the [#OH_AudioManager_GetAudioSessionManager].

  • callback - the [#OH_AudioSession_CurrentInputDeviceChangedCallback] which is used to receive the input device change event.

§Returns

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

Available since API-level: 21