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/.
6 * The origin of this IDL file is
7 * https://webaudio.github.io/web-audio-api/#enumdef-automationrate
8 * https://webaudio.github.io/web-audio-api/#audioparam
10 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
11 * liability, trademark and document use rules apply.
19 [Pref="dom.webaudio.enabled",
21 interface AudioParam {
23 attribute float value;
24 readonly attribute float defaultValue;
25 readonly attribute float minValue;
26 readonly attribute float maxValue;
28 // Parameter automation.
30 AudioParam setValueAtTime(float value, double startTime);
32 AudioParam linearRampToValueAtTime(float value, double endTime);
34 AudioParam exponentialRampToValueAtTime(float value, double endTime);
36 // Exponentially approach the target value with a rate having the given time constant.
38 AudioParam setTargetAtTime(float target, double startTime, double timeConstant);
40 // Sets an array of arbitrary parameter values starting at time for the given duration.
41 // The number of values will be scaled to fit into the desired duration.
43 AudioParam setValueCurveAtTime(sequence<float> values, double startTime, double duration);
45 // Cancels all scheduled parameter changes with times greater than or equal to startTime.
47 AudioParam cancelScheduledValues(double startTime);
52 partial interface AudioParam {
53 // The ID of the AudioNode this AudioParam belongs to.
55 readonly attribute unsigned long parentNodeId;
56 // The name of the AudioParam
58 readonly attribute DOMString name;
61 partial interface AudioParam {
62 // This attribute is used for mochitest only.
64 readonly attribute boolean isTrackSuspended;