2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-09-19 03:07:33 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* The origin of this IDL file is
|
2016-06-29 12:30:13 +03:00
|
|
|
* https://webaudio.github.io/web-audio-api/
|
2012-09-19 03:07:33 +04:00
|
|
|
*
|
|
|
|
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
|
|
|
* liability, trademark and document use rules apply.
|
|
|
|
*/
|
|
|
|
|
2013-04-28 02:44:50 +04:00
|
|
|
enum ChannelCountMode {
|
2018-09-13 23:04:55 +03:00
|
|
|
"max",
|
|
|
|
"clamped-max",
|
|
|
|
"explicit"
|
2013-04-28 02:44:50 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
enum ChannelInterpretation {
|
2018-09-13 23:04:55 +03:00
|
|
|
"speakers",
|
|
|
|
"discrete"
|
2013-04-28 02:44:50 +04:00
|
|
|
};
|
|
|
|
|
2016-12-15 21:24:41 +03:00
|
|
|
dictionary AudioNodeOptions {
|
2018-09-13 23:04:55 +03:00
|
|
|
unsigned long channelCount;
|
|
|
|
ChannelCountMode channelCountMode;
|
|
|
|
ChannelInterpretation channelInterpretation;
|
2016-12-15 21:24:41 +03:00
|
|
|
};
|
|
|
|
|
2019-09-27 18:26:14 +03:00
|
|
|
[Pref="dom.webaudio.enabled",
|
|
|
|
Exposed=Window]
|
2013-04-12 19:28:33 +04:00
|
|
|
interface AudioNode : EventTarget {
|
2012-09-19 03:07:33 +04:00
|
|
|
|
2018-09-13 23:04:55 +03:00
|
|
|
[Throws]
|
|
|
|
AudioNode connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0);
|
|
|
|
[Throws]
|
|
|
|
void connect(AudioParam destination, optional unsigned long output = 0);
|
|
|
|
[Throws]
|
|
|
|
void disconnect();
|
|
|
|
[Throws]
|
|
|
|
void disconnect(unsigned long output);
|
|
|
|
[Throws]
|
|
|
|
void disconnect(AudioNode destination);
|
|
|
|
[Throws]
|
|
|
|
void disconnect(AudioNode destination, unsigned long output);
|
|
|
|
[Throws]
|
|
|
|
void disconnect(AudioNode destination, unsigned long output, unsigned long input);
|
|
|
|
[Throws]
|
|
|
|
void disconnect(AudioParam destination);
|
|
|
|
[Throws]
|
|
|
|
void disconnect(AudioParam destination, unsigned long output);
|
2012-09-19 03:07:33 +04:00
|
|
|
|
2018-09-13 23:04:55 +03:00
|
|
|
readonly attribute BaseAudioContext context;
|
|
|
|
readonly attribute unsigned long numberOfInputs;
|
|
|
|
readonly attribute unsigned long numberOfOutputs;
|
2012-09-19 03:07:33 +04:00
|
|
|
|
2018-09-13 23:04:55 +03:00
|
|
|
// Channel up-mixing and down-mixing rules for all inputs.
|
|
|
|
[SetterThrows]
|
|
|
|
attribute unsigned long channelCount;
|
2019-08-28 20:51:37 +03:00
|
|
|
[SetterThrows, BinaryName="channelCountModeValue"]
|
2018-09-13 23:04:55 +03:00
|
|
|
attribute ChannelCountMode channelCountMode;
|
2019-08-28 20:51:37 +03:00
|
|
|
[SetterThrows, BinaryName="channelInterpretationValue"]
|
2018-09-13 23:04:55 +03:00
|
|
|
attribute ChannelInterpretation channelInterpretation;
|
2013-04-28 02:44:50 +04:00
|
|
|
|
2012-09-19 03:07:33 +04:00
|
|
|
};
|
|
|
|
|
2014-06-04 06:51:48 +04:00
|
|
|
// Mozilla extension
|
|
|
|
partial interface AudioNode {
|
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute unsigned long id;
|
|
|
|
};
|
2019-09-24 18:22:26 +03:00
|
|
|
interface mixin AudioNodePassThrough {
|
2014-08-19 04:12:50 +04:00
|
|
|
[ChromeOnly]
|
|
|
|
attribute boolean passThrough;
|
|
|
|
};
|
2014-06-04 06:51:48 +04:00
|
|
|
|