dom/webidl/BiquadFilterNode.webidl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
     8  *
     9  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
    10  * liability, trademark and document use rules apply.
    11  */
    13 enum BiquadFilterType {
    14   // Hack: Use numbers to support alternate enum values
    15   "0", "1", "2", "3", "4", "5", "6", "7",
    17   "lowpass",
    18   "highpass",
    19   "bandpass",
    20   "lowshelf",
    21   "highshelf",
    22   "peaking",
    23   "notch",
    24   "allpass"
    25 };
    27 interface BiquadFilterNode : AudioNode {
    29     attribute BiquadFilterType type;
    30     readonly attribute AudioParam frequency; // in Hertz
    31     readonly attribute AudioParam detune; // in Cents
    32     readonly attribute AudioParam Q; // Quality factor
    33     readonly attribute AudioParam gain; // in Decibels
    35     void getFrequencyResponse(Float32Array frequencyHz,
    36                               Float32Array magResponse,
    37                               Float32Array phaseResponse);
    39 };
    41 /*
    42  * The origin of this IDL file is
    43  * https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames
    44  */
    45 partial interface BiquadFilterNode {
    46     [Pref="media.webaudio.legacy.BiquadFilterNode"]
    47     const unsigned short LOWPASS = 0;
    48     [Pref="media.webaudio.legacy.BiquadFilterNode"]
    49     const unsigned short HIGHPASS = 1;
    50     [Pref="media.webaudio.legacy.BiquadFilterNode"]
    51     const unsigned short BANDPASS = 2;
    52     [Pref="media.webaudio.legacy.BiquadFilterNode"]
    53     const unsigned short LOWSHELF = 3;
    54     [Pref="media.webaudio.legacy.BiquadFilterNode"]
    55     const unsigned short HIGHSHELF = 4;
    56     [Pref="media.webaudio.legacy.BiquadFilterNode"]
    57     const unsigned short PEAKING = 5;
    58     [Pref="media.webaudio.legacy.BiquadFilterNode"]
    59     const unsigned short NOTCH = 6;
    60     [Pref="media.webaudio.legacy.BiquadFilterNode"]
    61     const unsigned short ALLPASS = 7;
    62 };

mercurial