aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/web/api/gainnode/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-tw/web/api/gainnode/index.html')
-rw-r--r--files/zh-tw/web/api/gainnode/index.html168
1 files changed, 168 insertions, 0 deletions
diff --git a/files/zh-tw/web/api/gainnode/index.html b/files/zh-tw/web/api/gainnode/index.html
new file mode 100644
index 0000000000..1d52092799
--- /dev/null
+++ b/files/zh-tw/web/api/gainnode/index.html
@@ -0,0 +1,168 @@
+---
+title: GainNode
+slug: Web/API/GainNode
+translation_of: Web/API/GainNode
+---
+<p>{{ APIRef("Web Audio API") }}</p>
+
+<div>
+<p><code>GainNode</code> 介面代表的是音量改變。 這是 {{domxref("AudioNode")}} 音訊處理模組,可以對輸入的訊號做增益 (gain) 後輸出。一個 <code>GainNode</code> 有一個輸入和一個輸出,兩者有相同的聲道數。</p>
+</div>
+
+<p>增益 (gain) 是無單位的數值,隨時間變化,會用來和所有輸入聲道的取樣做相乘。 如果更改的話,新的增益會用 de-zippering 演算法處理,以避免輸出聲音出現難聽的「喀」聲。</p>
+
+<p><img alt="The GainNode is increasing the gain of the output." src="https://mdn.mozillademos.org/files/5085/WebAudioGainNode.png" style="height: 116px; width: 774px;"></p>
+
+<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>"max"</code></td>
+ </tr>
+ <tr>
+ <th scope="row">Channel count</th>
+ <td><code>2</code> (not used in the default count mode)</td>
+ </tr>
+ <tr>
+ <th scope="row">Channel interpretation</th>
+ <td><code>"speakers"</code></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Constructor">Constructor</h2>
+
+<dl>
+ <dt>{{domxref("GainNode.GainNode", "GainNode()")}}</dt>
+ <dd>Creates a new instance of an GainNode object.</dd>
+</dl>
+
+<h2 id="Properties">Properties</h2>
+
+<p><em>Inherits properties from its parent, </em><em>{{domxref("AudioNode")}}</em>.</p>
+
+<dl>
+ <dt>{{domxref("GainNode.gain")}} {{readonlyinline}}</dt>
+ <dd>是 <a href="/en-US/docs/Web/API/AudioParam#a-rate">a-rate</a> {{domxref("AudioParam")}} ,代表增益值</dd>
+</dl>
+
+<h2 id="Methods">Methods</h2>
+
+<p><em>No specific method; inherits methods from its parent, </em><em>{{domxref("AudioNode")}}</em>.</p>
+
+<h2 id="Example">Example</h2>
+
+<p>{{page("/en-US/docs/Web/API/AudioContext.createGain","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', '#the-gainnode-interface', 'GainNode')}}</td>
+ <td>{{Spec2('Web Audio API')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatChrome(10.0)}}{{property_prefix("webkit")}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoDesktop(25.0)}} </td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatOpera(15)}}{{property_prefix("webkit")}}<br>
+ {{CompatOpera(22)}}</td>
+ <td>6.0{{property_prefix("webkit")}}</td>
+ </tr>
+ <tr>
+ <td>constructor</td>
+ <td>{{CompatChrome(55.0)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatOpera(42)}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Android Webview</th>
+ <th>Edge</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>Firefox OS</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ <th>Chrome for Android</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>26.0</td>
+ <td>1.2</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatChrome(33.0)}}</td>
+ </tr>
+ <tr>
+ <td>constructor</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatChrome(55.0)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatOpera(42)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatChrome(55.0)}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web_Audio_API/Using_Web_Audio_API">Using the Web Audio API</a></li>
+</ul>