1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/webidl/BiquadFilterNode.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,63 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + * 1.9 + * The origin of this IDL file is 1.10 + * https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html 1.11 + * 1.12 + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C 1.13 + * liability, trademark and document use rules apply. 1.14 + */ 1.15 + 1.16 +enum BiquadFilterType { 1.17 + // Hack: Use numbers to support alternate enum values 1.18 + "0", "1", "2", "3", "4", "5", "6", "7", 1.19 + 1.20 + "lowpass", 1.21 + "highpass", 1.22 + "bandpass", 1.23 + "lowshelf", 1.24 + "highshelf", 1.25 + "peaking", 1.26 + "notch", 1.27 + "allpass" 1.28 +}; 1.29 + 1.30 +interface BiquadFilterNode : AudioNode { 1.31 + 1.32 + attribute BiquadFilterType type; 1.33 + readonly attribute AudioParam frequency; // in Hertz 1.34 + readonly attribute AudioParam detune; // in Cents 1.35 + readonly attribute AudioParam Q; // Quality factor 1.36 + readonly attribute AudioParam gain; // in Decibels 1.37 + 1.38 + void getFrequencyResponse(Float32Array frequencyHz, 1.39 + Float32Array magResponse, 1.40 + Float32Array phaseResponse); 1.41 + 1.42 +}; 1.43 + 1.44 +/* 1.45 + * The origin of this IDL file is 1.46 + * https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames 1.47 + */ 1.48 +partial interface BiquadFilterNode { 1.49 + [Pref="media.webaudio.legacy.BiquadFilterNode"] 1.50 + const unsigned short LOWPASS = 0; 1.51 + [Pref="media.webaudio.legacy.BiquadFilterNode"] 1.52 + const unsigned short HIGHPASS = 1; 1.53 + [Pref="media.webaudio.legacy.BiquadFilterNode"] 1.54 + const unsigned short BANDPASS = 2; 1.55 + [Pref="media.webaudio.legacy.BiquadFilterNode"] 1.56 + const unsigned short LOWSHELF = 3; 1.57 + [Pref="media.webaudio.legacy.BiquadFilterNode"] 1.58 + const unsigned short HIGHSHELF = 4; 1.59 + [Pref="media.webaudio.legacy.BiquadFilterNode"] 1.60 + const unsigned short PEAKING = 5; 1.61 + [Pref="media.webaudio.legacy.BiquadFilterNode"] 1.62 + const unsigned short NOTCH = 6; 1.63 + [Pref="media.webaudio.legacy.BiquadFilterNode"] 1.64 + const unsigned short ALLPASS = 7; 1.65 +}; 1.66 +