Skip to content

Commit

Permalink
Update api_irtcengine_setaudioscenario.dita
Browse files Browse the repository at this point in the history
  • Loading branch information
jinyuagora committed May 8, 2024
1 parent b0f2e50 commit 1e3b836
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
5 changes: 3 additions & 2 deletions dita/RTC-NG/API/api_irtcengine_setaudioprofile.dita
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@
<title>调用时机</title>
<p>该方法在加入频道前后均可调用。</p>
</section>
<section id="restriction" deliveryTarget="details" props="ios cpp unreal bp flutter rn">
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p id="route">由于 iOS 系统限制,部分音频路由在通话音量模式下无法识别。因此,如需使用外接声卡,建议将音频应用场景设置为高音质场景 <codeph><ph keyref="AUDIO_SCENARIO_GAME_STREAMING" />(3)</codeph>。在这种场景下,SDK 会切换到媒体音量规避该问题。</p>
<p props="ios cpp unreal bp flutter rn">由于 iOS 系统限制,部分音频路由在通话音量模式下无法识别。因此,如需使用外接声卡,建议将音频应用场景设置为高音质场景 <codeph><ph keyref="AUDIO_SCENARIO_GAME_STREAMING" />(3)</codeph>。在这种场景下,SDK 会切换到媒体音量规避该问题。</p>
<p props="android mac electron">无。</p>
</section>
<section id="parameters">
<title>参数</title>
Expand Down
40 changes: 21 additions & 19 deletions dita/RTC-NG/API/api_irtcengine_setaudioscenario.dita
Original file line number Diff line number Diff line change
Expand Up @@ -16,47 +16,49 @@
<codeblock props="android" outputclass="language-java">public abstract int setAudioScenario(int scenario);</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (int)setAudioScenario:(AgoraAudioScenario)scenario;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int setAudioScenario(AUDIO_SCENARIO_TYPE scenario) = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|RtcEngineProxy&quot;)
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|RtcEngineProxy&quot;)
int SetAudioScenario(EAUDIO_SCENARIO_TYPE scenario = EAUDIO_SCENARIO_TYPE::AUDIO_SCENARIO_DEFAULT);</codeblock>
<codeblock props="electron" outputclass="language-typescript">abstract setAudioScenario(scenario: AudioScenarioType): number;</codeblock>
<codeblock props="unity cs" outputclass="language-csharp">public abstract int SetAudioScenario(AUDIO_SCENARIO_TYPE scenario);</codeblock>
<codeblock props="rn" outputclass="language-typescript">abstract setAudioScenario(scenario: AudioScenarioType): number;</codeblock>
<codeblock props="flutter" outputclass="language-dart">Future&lt;void&gt; setAudioScenario(AudioScenarioType scenario);</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>详情</title>
<note type="attention">
<ul>
<li>该方法在加入频道前后均可调用。</li>
<li conkeyref="setAudioProfile/route"/>
</ul>
</note> </section>
<section id="parameters">
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p/>
</section>
<section id="scenario" deliveryTarget="details">
<title>适用场景</title>
<p>该方法适用于各种音频场景,你可以按需选择。例如,在音乐教学等高音质需求的场景中,建议将 <parmname>scenario</parmname> 设置为 <codeph><ph keyref="AUDIO_SCENARIO_GAME_STREAMING" />(3)</codeph>。</p>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法在加入频道前后均可调用。</p>
</section>
<section id="restriction" deliveryTarget="details" conkeyref="setAudioProfile/restriction"/>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
<pt>scenario</pt>
<pd id="scenario-ng"><ph>音频场景。不同的音频场景下,设备的音量类型是不同的。</ph>
<ph props="ios mac cpp framework">详见 <xref keyref="AUDIO_SCENARIO_TYPE" /> 。</ph>
<ul props="android" id="scenario">
<li><ph keyref="AUDIO_SCENARIO_DEFAULT" /> (0):(默认)自动场景,根据用户角色和音频路由自动匹配合适的音质。</li>
<li><ph keyref="AUDIO_SCENARIO_GAME_STREAMING" /> (3): 高音质场景,适用于音乐为主的场景。
</li>
<li><ph keyref="AUDIO_SCENARIO_CHATROOM" /> (5): 聊天室场景,适用于用户需要频繁上下麦的场景。该场景下,观众会收到申请麦克风权限的弹窗提示。</li>
<li><ph keyref="AUDIO_SCENARIO_CHORUS" /> (7): 合唱场景。适用于网络条件良好,要求极低延时的实时合唱场景。
<ul props="android">
<li><codeph><ph keyref="AUDIO_SCENARIO_DEFAULT" />(0)</codeph>:(默认)自动场景,根据用户角色和音频路由自动匹配合适的音质。</li>
<li><codeph><ph keyref="AUDIO_SCENARIO_GAME_STREAMING" />(3)</codeph>: 高音质场景,适用于音乐为主的场景。</li>
<li><codeph><ph keyref="AUDIO_SCENARIO_CHATROOM" />(5)</codeph>: 聊天室场景,适用于用户需要频繁上下麦的场景。该场景下,观众会收到申请麦克风权限的弹窗提示。</li>
<li><codeph><ph keyref="AUDIO_SCENARIO_CHORUS" />(7)</codeph>: 合唱场景。适用于网络条件良好,要求极低延时的实时合唱场景。
<note conkeyref="AUDIO_SCENARIO_TYPE/chorus" /></li>
<li><ph keyref="AUDIO_SCENARIO_MEETING" /> (8): 会议场景,适用于人声为主的多人会议。</li>
<li><ph keyref="AUDIO_SCENARIO_MEETING" />(8)</codeph>: 会议场景,适用于人声为主的多人会议。</li>
</ul>
</pd>
</plentry>
</parml> </section>
<section id="return_values">
<title><ph keyref="return-section-title"/></title>
<p props="flutter">方法成功调用时,无返回值;方法调用失败时,会抛出 <xref keyref="AgoraRtcException"/> 异常,你需要捕获异常并进行处理。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></p>
<ul props="native unreal bp rn electron unity cs">
<li>0: 方法调用成功。</li>
<li>&lt; 0: 方法调用失败。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></li>
</ul> </section>
</refbody>
</refbody>
</reference>

0 comments on commit 1e3b836

Please sign in to comment.