michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origin of this IDL file is michael@0: * https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html michael@0: * michael@0: * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C michael@0: * liability, trademark and document use rules apply. michael@0: */ michael@0: michael@0: enum BiquadFilterType { michael@0: // Hack: Use numbers to support alternate enum values michael@0: "0", "1", "2", "3", "4", "5", "6", "7", michael@0: michael@0: "lowpass", michael@0: "highpass", michael@0: "bandpass", michael@0: "lowshelf", michael@0: "highshelf", michael@0: "peaking", michael@0: "notch", michael@0: "allpass" michael@0: }; michael@0: michael@0: interface BiquadFilterNode : AudioNode { michael@0: michael@0: attribute BiquadFilterType type; michael@0: readonly attribute AudioParam frequency; // in Hertz michael@0: readonly attribute AudioParam detune; // in Cents michael@0: readonly attribute AudioParam Q; // Quality factor michael@0: readonly attribute AudioParam gain; // in Decibels michael@0: michael@0: void getFrequencyResponse(Float32Array frequencyHz, michael@0: Float32Array magResponse, michael@0: Float32Array phaseResponse); michael@0: michael@0: }; michael@0: michael@0: /* michael@0: * The origin of this IDL file is michael@0: * https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames michael@0: */ michael@0: partial interface BiquadFilterNode { michael@0: [Pref="media.webaudio.legacy.BiquadFilterNode"] michael@0: const unsigned short LOWPASS = 0; michael@0: [Pref="media.webaudio.legacy.BiquadFilterNode"] michael@0: const unsigned short HIGHPASS = 1; michael@0: [Pref="media.webaudio.legacy.BiquadFilterNode"] michael@0: const unsigned short BANDPASS = 2; michael@0: [Pref="media.webaudio.legacy.BiquadFilterNode"] michael@0: const unsigned short LOWSHELF = 3; michael@0: [Pref="media.webaudio.legacy.BiquadFilterNode"] michael@0: const unsigned short HIGHSHELF = 4; michael@0: [Pref="media.webaudio.legacy.BiquadFilterNode"] michael@0: const unsigned short PEAKING = 5; michael@0: [Pref="media.webaudio.legacy.BiquadFilterNode"] michael@0: const unsigned short NOTCH = 6; michael@0: [Pref="media.webaudio.legacy.BiquadFilterNode"] michael@0: const unsigned short ALLPASS = 7; michael@0: }; michael@0: