Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
jinyuagora committed Jul 3, 2024
1 parent 3cdbbc5 commit 88a0d0a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
20 changes: 13 additions & 7 deletions dita/RTC-NG/API/api_imediaengine_pushaudioframe0.dita
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@
<codeblock props="flutter" outputclass="language-dart">Future&lt;void> pushAudioFrame({required AudioFrame frame, int trackId = 0});</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>详情</title>
<note type="attention">
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p>调用该方法推送外部音频数据前,请先进行以下操作:<ol>
<li>调用 <xref keyref="createCustomAudioTrack"/> 创建音频轨道并获得音频轨道 ID。</li>
<li>调用 <xref keyref="joinChannel2"/> 加入频道时,将 <xref keyref="ChannelMediaOptions"/> 中的 <parmname>publishCustomAudioTrackId</parmname> 设置为你想要发布的音频轨道 ID,并将 <parmname>publishCustomAudioTrack</parmname> 设置为 <codeph><ph keyref="true"/></codeph>。</li>
</ol></p>
</note> </section>
<section id="parameters">
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在加入频道后调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
Expand All @@ -46,8 +52,8 @@
<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>
<li props="cpp unreal bp unity electron rn cs">0:方法调用成功。</li>
<ul props="cpp unreal bp unity electron rn cs">
<li>0:方法调用成功。</li>
<li>&lt; 0:方法调用失败。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></li>
</ul> </section>
</refbody>
Expand Down
26 changes: 14 additions & 12 deletions dita/RTC-NG/API/api_irtcengine_pushaudioframe2.dita
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,21 @@
<codeblock props="flutter" outputclass="language-dart"/>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>详情</title>
<note type="attention" id="sequence">
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p>调用该方法推送外部音频数据前,请先进行以下操作:<ol>
<li>调用 <xref keyref="createCustomAudioTrack"/> 创建音频轨道并获得音频轨道 ID。</li>
<li>调用 <xref keyref="joinChannel2"/> 加入频道时,将 <xref keyref="ChannelMediaOptions"/> 中的 <parmname>publishCustomAudioTrackId</parmname> 设置为你想要发布的音频轨道 ID,并将 <parmname>publishCustomAudioTrack</parmname> 设置为 <codeph><ph keyref="true"/></codeph>。</li>
</ol></p>
</note> </section>
<section id="parameters">
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在加入频道后调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
Expand All @@ -54,23 +60,19 @@
</plentry>
<plentry id="samplerate">
<pt>sampleRate</pt>
<pd>外部音频渲染的采样率 (Hz),可设置为 8000160003200044100 或 48000。</pd>
<pd>外部音频源的采样率 (Hz),可设置为 <codeph>8000</codeph>,<codeph>16000</codeph>,<codeph>32000</codeph>,<codeph>44100</codeph><codeph>48000</codeph>。</pd>
</plentry>
<plentry id="channels">
<pt>channels</pt>
<pd>外部音频渲染的声道数:
<ul>
<li>1: 单声道</li>
<li>2: 双声道</li>
</ul></pd>
<pd>外部音频源的声道数,可设置为 <codeph>1</codeph>(单声道)或 <codeph>2</codeph>(双声道)。</pd>
</plentry>
<plentry props="android hmos">
<pt>bytesPerSample</pt>
<pd>每个采样点的字节数。对于 PCM 来说,一般使用 16 bit,即两个字节。</pd>
</plentry>
<plentry id="trackid">
<pt>trackId</pt>
<pd>音频轨道 ID。将该参数设置为 <xref keyref="createCustomAudioTrack"/> 方法中返回的自定义音频轨道 ID。</pd>
<pd>音频轨道 ID。将该参数设置为 <apiname keyref="createCustomAudioTrack"/> 方法中返回的自定义音频轨道 ID。</pd>
</plentry>
</parml> </section>
<section id="return_values">
Expand Down

0 comments on commit 88a0d0a

Please sign in to comment.