AudioNode: channelCount-Eigenschaft
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.
Die channelCount
-Eigenschaft der AudioNode
-Schnittstelle repräsentiert eine Ganzzahl, die verwendet wird, um zu bestimmen, wie viele Kanäle beim Up-Mixen und Down-Mixen von Verbindungen zu beliebigen Eingängen des Knotens verwendet werden.
Die Nutzung und genaue Definition von channelCount
hängt vom Wert von AudioNode.channelCountMode
ab:
- Sie wird ignoriert, wenn der Wert von
channelCountMode
max
ist. - Sie wird als maximaler Wert verwendet, wenn der Wert von
channelCountMode
clamped-max
ist. - Sie wird als exakter Wert verwendet, wenn der Wert von
channelCountMode
explicit
ist.
Wert
Eine Ganzzahl.
Beispiele
js
const audioCtx = new AudioContext();
const oscillator = audioCtx.createOscillator();
const gainNode = audioCtx.createGain();
oscillator.connect(gainNode);
gainNode.connect(audioCtx.destination);
oscillator.channelCount;
Spezifikationen
Specification |
---|
Web Audio API # dom-audionode-channelcount |
Browser-Kompatibilität
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.