diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index c65846fad981efc826af543d684453539ebae52d..c05f394ed88b87e5f4275b59d6e50502676816a5 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -448,6 +448,35 @@ OH_AudioStream_Result OH_AudioRenderer_SetEffectMode(OH_AudioRenderer* renderer, */ OH_AudioStream_Result OH_AudioRenderer_GetRendererPrivacy(OH_AudioRenderer* renderer, OH_AudioStream_PrivacyType* privacy); + +/** + * @brief Set silent and mix with other streams for this stream. + * + * @param renderer Renderer generated by OH_AudioStreamBuilder_GenerateRenderer() + * @param on The silent and mix with other streams mode. + * true: set the slient mode and mix with other streams. + * false: unset the slient mode, current stream will trigger the audio focus internally. + * @return result code for this function. + * {@link #AUDIOSTREAM_SUCCESS} succeed in setting to the silent and mix with other streams. + * {@link #AUDIOSTREAM_ERROR_ILLEGAL_STATE} this stream is not allowed to set/unset the silent mode. + * @since 12 + */ +OH_AudioStream_Result OH_AudioRenderer_SetSilentModeAndMixWithOthers( + OH_AudioRenderer* renderer, bool on); + +/** + * @brief Query silent and mix with other streams status for this stream. + * + * @param renderer Renderer generated by OH_AudioStreamBuilder_GenerateRenderer() + * @param on Pointer to the silent and mix with other streams status. + * @return result code for this function. + * {@link #AUDIOSTREAM_SUCCESS} succeed in getting silent and mix with other streams status + * {@link #AUDIOSTREAM_ERROR_SYSTEM} system error when calling this function. + * @since 12 + */ +OH_AudioStream_Result OH_AudioRenderer_GetSilentModeAndMixWithOthers( + OH_AudioRenderer* renderer, bool* on); + #ifdef __cplusplus } #endif