Skip to main content

OH_AudioSessionManager_SetScene

Function OH_AudioSessionManager_SetScene 

Source
pub unsafe extern "C" fn OH_AudioSessionManager_SetScene(
    audioSessionManager: *mut OH_AudioSessionManager,
    scene: OH_AudioSession_Scene,
) -> OH_AudioCommon_Result
Available on crate features api-12 and api-20 only.
Expand description

Set scene for audio session.

§Arguments

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

  • scene - the [#OH_AudioSession_Scene]

§Returns

  • [#AUDIOCOMMON_RESULT_SUCCESS] if execution succeeds or [#AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM] if parameter validation fails or [#AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE] if system illegal state or [#AUDIOCOMMON_RESULT_ERROR_SYSTEM] if system state error

Available since API-level: 20