tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

AudioNode.webidl (2345B)


      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/.
      5 *
      6 * The origin of this IDL file is
      7 * https://webaudio.github.io/web-audio-api/
      8 *
      9 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
     10 * liability, trademark and document use rules apply.
     11 */
     12 
     13 enum ChannelCountMode {
     14    "max",
     15    "clamped-max",
     16    "explicit"
     17 };
     18 
     19 enum ChannelInterpretation {
     20    "speakers",
     21    "discrete"
     22 };
     23 
     24 dictionary AudioNodeOptions {
     25             unsigned long         channelCount;
     26             ChannelCountMode      channelCountMode;
     27             ChannelInterpretation channelInterpretation;
     28 };
     29 
     30 [Pref="dom.webaudio.enabled",
     31 Exposed=Window]
     32 interface AudioNode : EventTarget {
     33 
     34    [Throws]
     35    AudioNode connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0);
     36    [Throws]
     37    undefined connect(AudioParam destination, optional unsigned long output = 0);
     38    [Throws]
     39    undefined disconnect();
     40    [Throws]
     41    undefined disconnect(unsigned long output);
     42    [Throws]
     43    undefined disconnect(AudioNode destination);
     44    [Throws]
     45    undefined disconnect(AudioNode destination, unsigned long output);
     46    [Throws]
     47    undefined disconnect(AudioNode destination, unsigned long output, unsigned long input);
     48    [Throws]
     49    undefined disconnect(AudioParam destination);
     50    [Throws]
     51    undefined disconnect(AudioParam destination, unsigned long output);
     52 
     53    readonly attribute BaseAudioContext context;
     54    readonly attribute unsigned long numberOfInputs;
     55    readonly attribute unsigned long numberOfOutputs;
     56 
     57    // Channel up-mixing and down-mixing rules for all inputs.
     58    [SetterThrows]
     59    attribute unsigned long channelCount;
     60    [SetterThrows, BinaryName="channelCountModeValue"]
     61    attribute ChannelCountMode channelCountMode;
     62    [SetterThrows, BinaryName="channelInterpretationValue"]
     63    attribute ChannelInterpretation channelInterpretation;
     64 
     65 };
     66 
     67 // Mozilla extension
     68 partial interface AudioNode {
     69  [ChromeOnly]
     70  readonly attribute unsigned long id;
     71 };
     72 interface mixin AudioNodePassThrough {
     73  [ChromeOnly]
     74  attribute boolean passThrough;
     75 };