diff options
author | Florian Merz <me@fiji-flo.de> | 2021-02-11 12:07:59 +0100 |
---|---|---|
committer | Florian Merz <me@fiji-flo.de> | 2021-02-11 12:07:59 +0100 |
commit | 6ef1fa4618e08426b874529619a66adbd3d1fcf0 (patch) | |
tree | 890e3e27131be010d82ef957fa68db495006cb0e /files/ja/web/api/baseaudiocontext/createdelay | |
parent | 8260a606c143e6b55a467edf017a56bdcd6cba7e (diff) | |
download | translated-content-6ef1fa4618e08426b874529619a66adbd3d1fcf0.tar.gz translated-content-6ef1fa4618e08426b874529619a66adbd3d1fcf0.tar.bz2 translated-content-6ef1fa4618e08426b874529619a66adbd3d1fcf0.zip |
unslug ja: move
Diffstat (limited to 'files/ja/web/api/baseaudiocontext/createdelay')
-rw-r--r-- | files/ja/web/api/baseaudiocontext/createdelay/index.html | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/files/ja/web/api/baseaudiocontext/createdelay/index.html b/files/ja/web/api/baseaudiocontext/createdelay/index.html new file mode 100644 index 0000000000..709a8a375b --- /dev/null +++ b/files/ja/web/api/baseaudiocontext/createdelay/index.html @@ -0,0 +1,143 @@ +--- +title: AudioContext.createDelay() +slug: Web/API/AudioContext/createDelay +translation_of: Web/API/BaseAudioContext/createDelay +--- +<p>{{ APIRef("Web Audio API") }}</p> + +<div> +<p>{{ domxref("AudioContext") }}インターフェースの<code>createDelay()</code>メソッドは、入力音声信号を一定時間遅らせる{{domxref("DelayNode")}}を生成します。</p> +</div> + +<h2 id="構文">構文</h2> + +<pre class="brush: js">var audioCtx = new AudioContext(); +var synthDelay = audioCtx.createDelay(maxDelayTime);</pre> + +<h3 id="引数">引数</h3> + +<dl> + <dt>maxDelayTime</dt> + <dd>音声信号の最大遅れ時間の秒数。デフォルトは0</dd> +</dl> + +<h3 id="戻り値">戻り値</h3> + +<p>{{domxref("DelayNode")}}</p> + +<h2 id="例">例</h2> + +<p>ループする3つの異なる簡単な例を用意しました。<a href="http://chrisdavidmills.github.io/create-delay/">create-delay</a>を見てください。(<a href="https://github.com/chrisdavidmills/create-delay">ソースコードも閲覧</a>できます。)ただPlayボタンを押すと、ループはすぐ始まります。スライダーを右に動かしPlayボタンを押すと、待ち時間が挿入され、少し時間が過ぎるまで再生が始まりません。</p> + +<pre class="brush: js;highlight[4,15,16,21,22]">var AudioContext = window.AudioContext || window.webkitAudioContext; +var audioCtx = new AudioContext(); + +var synthDelay = audioCtx.createDelay(5.0); + + ... + +var synthSource; + +playSynth.onclick = function() { + synthSource = audioCtx.createBufferSource(); + synthSource.buffer = buffers[2]; + synthSource.loop = true; + synthSource.start(); + synthSource.connect(synthDelay); + synthDelay.connect(destination); + this.setAttribute('disabled', 'disabled'); +} + +stopSynth.onclick = function() { + synthSource.disconnect(synthDelay); + synthDelay.disconnect(destination); + synthSource.stop(); + playSynth.removeAttribute('disabled'); +} + +... + +var delay1; +rangeSynth.oninput = function() { +delay1 = rangeSynth.value; +synthDelay.delayTime.value = delay1; +} +</pre> + +<h2 id="仕様">仕様</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', '#widl-AudioContext-createDelay-DelayNode-double-maxDelayTime', 'createDelay()')}}</td> + <td>{{Spec2('Web Audio API')}}</td> + <td> </td> + </tr> + </tbody> +</table> + +<h2 id="ブラウザ互換性">ブラウザ互換性</h2> + +<div>{{CompatibilityTable}}</div> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</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>{{CompatGeckoDesktop(25.0)}} </td> + <td>{{CompatNo}}</td> + <td>15.0{{property_prefix("webkit")}}<br> + 22 (unprefixed)</td> + <td>6.0{{property_prefix("webkit")}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</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>{{CompatUnknown}}</td> + <td>26.0</td> + <td>1.2</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>33.0</td> + </tr> + </tbody> +</table> +</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> |