From a2502fbfa4e1db07cf492c3e45fd7471b29505a4 Mon Sep 17 00:00:00 2001 From: yaojingyu2008 Date: Thu, 20 Jul 2023 14:29:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0GetAudioEffectInfoArray?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yaojingyu2008 --- .../media/audio-effect-management.md | 4 ++-- .../reference/apis/js-apis-audio.md | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/zh-cn/application-dev/media/audio-effect-management.md b/zh-cn/application-dev/media/audio-effect-management.md index 8e45e7d888..d10ae5a36a 100644 --- a/zh-cn/application-dev/media/audio-effect-management.md +++ b/zh-cn/application-dev/media/audio-effect-management.md @@ -91,7 +91,7 @@ ## 全局查询音效模式 -主要包括全局音效查询相应ContentType和StreamUsage对应场景的音效模式。 +主要包括全局音效查询相应StreamUsage对应场景的音效模式。 对于播放音频类的应用,开发者需要关注该应用的音频流使用什么音效模式并做出相应的操作,比如音乐App播放时,应选择音乐场景下的模式。在使用查询接口前,开发者需要使用getStreamManager()创建一个AudioStreamManager音频流管理实例。 ### 获取音频流管理接口 @@ -107,7 +107,7 @@ ### 查询对应场景的音效模式 ```js - audioStreamManager.getAudioEffectInfoArray(audio.ContentType.CONTENT_TYPE_MUSIC, audio.StreamUsage.STREAM_USAGE_MEDIA, async (err, audioEffectInfoArray) => { + audioStreamManager.getAudioEffectInfoArray(audio.StreamUsage.STREAM_USAGE_MEDIA, async (err, audioEffectInfoArray) => { if (err) { console.error('Failed to get effect info array'); return; diff --git a/zh-cn/application-dev/reference/apis/js-apis-audio.md b/zh-cn/application-dev/reference/apis/js-apis-audio.md index 91f46f2e8f..61b6a6e36b 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-audio.md +++ b/zh-cn/application-dev/reference/apis/js-apis-audio.md @@ -3689,6 +3689,15 @@ getAudioEffectInfoArray(usage: StreamUsage, callback: AsyncCallback<AudioEffe | usage | [StreamUsage](#streamusage) | 是 | 音频流使用类型。 | | callback | AsyncCallback<[AudioEffectInfoArray](#audioeffectinfoarray10)> | 是 | 回调函数,返回当前音效模式的信息。| +**错误码:** + +以下错误码的详细介绍请参见[音频错误码](../errorcodes/errorcode-audio.md)。 + +| 错误码ID | 错误信息 | +| ------- | --------------------------------------------| +| 401 | if input parameter type or number mismatch | +| 6800101 | if input parameter value error | + **示例:** ```js @@ -3723,6 +3732,15 @@ getAudioEffectInfoArray(usage: StreamUsage): Promise<AudioEffectInfoArray> | --------------------------------------------------------------------------| --------------------------------------- | | Promise<[AudioEffectInfoArray](#audioeffectinfoarray10)> | Promise对象,返回当前音效模式的信息。 | +**错误码:** + +以下错误码的详细介绍请参见[音频错误码](../errorcodes/errorcode-audio.md)。 + +| 错误码ID | 错误信息 | +| ------- | --------------------------------------------| +| 401 | if input parameter type or number mismatch | +| 6800101 | if input parameter value error | + **示例:** ```js -- GitLab