AudioNode: channelCount プロパティ
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.
AudioNode
インターフェイスの channelCount
プロパティは、このノードへの入力についてアップミキシングとダウンミキシングを行う際、何個のチャンネルを用いるかを決定するとき用いる整数です。
channelCount
の使用法と正確な定義は、AudioNode.channelCountMode
の値によって以下のようになります。
channelCountMode
の値がmax
のときは、無視されます。channelCountMode
の値がclamped-max
のときは、最大値として用いられます。channelCountMode
の値がexplicit
のときは、ちょうどの値として用いられます。
値
整数です。
例
js
const audioCtx = new AudioContext();
const oscillator = audioCtx.createOscillator();
const gainNode = audioCtx.createGain();
oscillator.connect(gainNode);
gainNode.connect(audioCtx.destination);
oscillator.channelCount;
仕様書
Specification |
---|
Web Audio API # dom-audionode-channelcount |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
channelCount |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.