Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. AudioDestinationNode

AudioDestinationNode

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨July 2015⁩.

TheAudioDestinationNode interface represents the end destination of an audio graph in a given context — usually the speakers of your device. It can also be the node that will "record" the audio data when used with anOfflineAudioContext.

AudioDestinationNode has no output (as itis the output, no moreAudioNode can be linked after it in the audio graph) and one input. The number of channels in the input must be between0 and themaxChannelCount value or an exception is raised.

TheAudioDestinationNode of a givenAudioContext can be retrieved using theAudioContext.destination property.

EventTarget AudioNode AudioDestinationNode
Number of inputs1
Number of outputs0
Channel count mode"explicit"
Channel count2
Channel interpretation"speakers"

Instance properties

Inherits properties from its parent,AudioNode.

AudioDestinationNode.maxChannelCount

Anunsigned long defining the maximum number of channels that the physical device can handle.

Instance methods

No specific method; inherits methods from its parent,AudioNode.

Example

There is no complex set up for using anAudioDestinationNode — by default, this represents the output of the user's system (e.g., their speakers), so you can get it hooked up inside an audio graph using only a few lines of code:

js
const audioCtx = new AudioContext();const source = audioCtx.createMediaElementSource(myMediaElement);source.connect(gainNode);gainNode.connect(audioCtx.destination);

To see a more complete implementation, check out one of our MDN Web Audio examples, such asVoice-change-o-matic orViolent Theremin.

Specifications

Specification
Web Audio API
# AudioDestinationNode

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp