1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
6 * The origin of this IDL file is
7 * https://webaudio.github.io/web-audio-api/
9 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10 * liability, trademark and document use rules apply.
13 enum ChannelCountMode {
19 enum ChannelInterpretation {
24 dictionary AudioNodeOptions {
25 unsigned long channelCount;
26 ChannelCountMode channelCountMode;
27 ChannelInterpretation channelInterpretation;
30 [Pref="dom.webaudio.enabled",
32 interface AudioNode : EventTarget {
35 AudioNode connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0);
37 undefined connect(AudioParam destination, optional unsigned long output = 0);
39 undefined disconnect();
41 undefined disconnect(unsigned long output);
43 undefined disconnect(AudioNode destination);
45 undefined disconnect(AudioNode destination, unsigned long output);
47 undefined disconnect(AudioNode destination, unsigned long output, unsigned long input);
49 undefined disconnect(AudioParam destination);
51 undefined disconnect(AudioParam destination, unsigned long output);
53 readonly attribute BaseAudioContext context;
54 readonly attribute unsigned long numberOfInputs;
55 readonly attribute unsigned long numberOfOutputs;
57 // Channel up-mixing and down-mixing rules for all inputs.
59 attribute unsigned long channelCount;
60 [SetterThrows, BinaryName="channelCountModeValue"]
61 attribute ChannelCountMode channelCountMode;
62 [SetterThrows, BinaryName="channelInterpretationValue"]
63 attribute ChannelInterpretation channelInterpretation;
68 partial interface AudioNode {
70 readonly attribute unsigned long id;
72 interface mixin AudioNodePassThrough {
74 attribute boolean passThrough;