diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/dynamicscompressornode | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/dynamicscompressornode')
-rw-r--r-- | files/zh-cn/web/api/dynamicscompressornode/index.html | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/dynamicscompressornode/index.html b/files/zh-cn/web/api/dynamicscompressornode/index.html new file mode 100644 index 0000000000..205bee48b2 --- /dev/null +++ b/files/zh-cn/web/api/dynamicscompressornode/index.html @@ -0,0 +1,108 @@ +--- +title: DynamicsCompressorNode +slug: Web/API/DynamicsCompressorNode +tags: + - API + - Audio + - DynamicsCompressorNode + - Web Audio API + - 动态压缩器 + - 媒体 + - 音频 +translation_of: Web/API/DynamicsCompressorNode +--- +<p>{{ APIRef("Web Audio API") }}</p> + +<div> +<p><code>DynamicsCompressorNode</code> 接口提供了一个压缩效果器,用以降低信号中最响部分的音量,来协助避免在多个声音同时播放并叠加在一起的时候产生的削波失真。通常用于音乐创作和游戏音效中。<code>DynamicsCompressorNode</code> 是一个 {{domxref("AudioNode")}} ,只有一路输入和一路输出,使用 {{domxref("AudioContext.createDynamicsCompressor()")}} 方法创建。</p> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">Number of inputs</th> + <td><code>1</code></td> + </tr> + <tr> + <th scope="row">Number of outputs</th> + <td><code>1</code></td> + </tr> + <tr> + <th scope="row">Channel count mode</th> + <td><code>"explicit"</code></td> + </tr> + <tr> + <th scope="row">Channel count</th> + <td><code>2</code></td> + </tr> + <tr> + <th scope="row">Channel interpretation</th> + <td><code>"speakers"</code></td> + </tr> + </tbody> +</table> + +<h2 id="构造方法">构造方法</h2> + +<dl> + <dt>{{domxref("DynamicsCompressorNode.DynamicsCompressorNode", "DynamicsCompressorNode()")}}</dt> + <dd>创建一个新的 <code>DynamicsCompressorNode</code> 对象实例。</dd> +</dl> + +<h2 id="属性">属性</h2> + +<p><em>由父类 </em><em>{{domxref("AudioNode")}} 派生</em></p> + +<dl> + <dt>{{domxref("DynamicsCompressorNode.threshold")}} {{readonlyInline}}</dt> + <dd><a href="/en-US/docs/DOM/AudioParam#k-rate">比例系数</a> {{domxref("AudioParam")}} 型。分贝高于此值时,将会进行压缩。</dd> + <dt>{{domxref("DynamicsCompressorNode.knee")}} {{readonlyInline}}</dt> + <dd><a href="/en-US/docs/DOM/AudioParam#k-rate">比例系数</a> {{domxref("AudioParam")}} 型。当超出 threshold 设置的值之后,曲线在哪个点开始朝着 ratio 设置的部分平滑变换。</dd> + <dt>{{domxref("DynamicsCompressorNode.ratio")}} {{readonlyInline}}</dt> + <dd><a href="/en-US/docs/DOM/AudioParam#k-rate">比例系数</a> {{domxref("AudioParam")}} 型。输入增益变化多少来产生 1 dB 的输出。</dd> + <dt>{{domxref("DynamicsCompressorNode.reduction")}} {{readonlyInline}}</dt> + <dd><code>float</code> 型。表示当前压缩器使用的增益压缩值。</dd> + <dt>{{domxref("DynamicsCompressorNode.attack")}} {{readonlyInline}}</dt> + <dd><a href="/en-US/docs/DOM/AudioParam#k-rate">比例系数</a> {{domxref("AudioParam")}} 型。降低增益 10 dB 的时间(单位为秒)。</dd> + <dt>{{domxref("DynamicsCompressorNode.release")}} {{readonlyInline}}</dt> + <dd><a href="/en-US/docs/DOM/AudioParam#k-rate">比例系数</a> {{domxref("AudioParam")}} 型。提升增益 10 dB 的时间(单位为秒)。</dd> +</dl> + +<h2 id="方法">方法</h2> + +<p><em>没有自定义的方法,继承父类 </em><em>{{domxref("AudioNode")}} 中的方法。</em></p> + +<h2 id="示例">示例</h2> + +<p>{{page("/en-US/docs/Web/API/AudioContext.createDynamicsCompressor","Example")}}</p> + +<h2 id="Specifications">Specifications</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName('Web Audio API', '#DynamicsCompressorNode-section', 'DynamicsCompressorNode')}}</td> + <td>{{Spec2('Web Audio API')}}</td> + <td> </td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + +<div> + + +<p>{{Compat("api.DynamicsCompressorNode")}}</p> +</div> + +<h2 id="参见">参见</h2> + +<ul> + <li><a href="/en-US/docs/Web_Audio_API/Using_Web_Audio_API">Using the Web Audio API</a></li> +</ul> |