From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/api/audiobuffersourcenode/start/index.html | 123 +++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 files/ja/web/api/audiobuffersourcenode/start/index.html (limited to 'files/ja/web/api/audiobuffersourcenode/start') diff --git a/files/ja/web/api/audiobuffersourcenode/start/index.html b/files/ja/web/api/audiobuffersourcenode/start/index.html new file mode 100644 index 0000000000..b8116686fe --- /dev/null +++ b/files/ja/web/api/audiobuffersourcenode/start/index.html @@ -0,0 +1,123 @@ +--- +title: AudioBufferSourceNode.start() +slug: Web/API/AudioBufferSourceNode/start +translation_of: Web/API/AudioBufferSourceNode/start +--- +

{{ APIRef("Web Audio API") }}

+ +
+

インターフェースのstart()メソッドは、オーディオバッファの再生をスケジュールするために使われます。

+
+ +

構文

+ +
var source = audioCtx.createBufferSource();
+source.start(when, offset, duration);
+
+ +

+ +

最も単純なオーディオバッファの再生方法—この場合は何もパラメータを指定する必要はありません。

+ +
source.start();
+ +

次はそれよりも複雑な再生方法です。1秒待った後、オーディオバッファの3秒経過した位置から、10秒間再生します。

+ +
source.start(audioCtx.currentTime + 1,3,10);
+ +
+

注: start()の使い方の完全な例は{{domxref("AudioContext.decodeAudioData")}}を参照してください。コードをすぐに実行することや、ソースコードを閲覧することもできます。

+
+ +

戻り値

+ +

なし

+ +

引数

+ +
+
when
+
whenパラメータは、再生がいつ始まるかを決定します。whenの時刻を過ぎると、再生が始まります。このメソッドが2回以上、またはAudioBufferSourceNode.stop()の後に呼ばれると、例外が発生します
+
offset
+
offsetパラメータは、再生がどこから始まるかを決定します
+
duration
+
durationパラメータは、デフォルトは音声の長さからoffsetの値を引いた値で、再生時間を決定します
+
+ +

仕様

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Web Audio API', '#widl-AudioBufferSourceNode-start-void-double-when-double-offset-double-duration', 'start()')}}{{Spec2('Web Audio API')}} 
+ +

ブラウザ互換性

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support14 {{property_prefix("webkit")}}23{{CompatNo}}15 {{property_prefix("webkit")}}
+ 22 (unprefixed)
6 {{property_prefix("webkit")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChromeFirefox Mobile (Gecko)Firefox OSIE PhoneOpera MobileSafari Mobile
Basic support{{CompatNo}}28 {{property_prefix("webkit")}}251.2{{CompatNo}}{{CompatNo}}6 {{property_prefix("webkit")}}
+
+ +

参考

+ + -- cgit v1.2.3-54-g00ecf