BaseAudioContext: destination プロパティ

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2021.

destinationBaseAudioContext のプロパティで、このコンテキストのすべての音声の最終的な出力先を表す AudioDestinationNode を返します。これは、端末のスピーカーのような、オーディオレンダリング機器と考えることができます。

メモ: より完全な応用例や情報については、Voice-change-O-matic のデモをご覧ください(関連するコードは app.js の 108 - 193 行目を参照)。

js
const audioCtx = new AudioContext();
// 古い webkit/blink のブラウザーでは接頭辞が必要です

const oscillatorNode = audioCtx.createOscillator();
const gainNode = audioCtx.createGain();

oscillatorNode.connect(gainNode);
gainNode.connect(audioCtx.destination);

仕様書

Specification
Web Audio API
# dom-baseaudiocontext-destination

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
destination

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報