From fc43253a71c7fd9b961f5b8b5f4e4c31e997847e Mon Sep 17 00:00:00 2001 From: Zz00836346 Date: Thu, 16 May 2024 17:24:30 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20993234e=20from=20https://gitee.com/zhen?= =?UTF-8?q?gxin3/interface=5Fsdk=5Fc/pulls/705=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E5=BA=94=E7=94=A8=E9=9D=99=E9=9F=B3=E5=B9=B6?= =?UTF-8?q?=E5=8F=91=E6=92=AD=E6=94=BE=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: z00836346 Change-Id: I0bd396f11f3501677c3247e3ba96b62ce2bcb214 --- .../audio_renderer/native_audiorenderer.h | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index c65846fad98..c05f394ed88 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 -- Gitee