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/
9 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10 * liability, trademark and document use rules apply.
18 [Pref="dom.webaudio.enabled",
20 interface AudioParam {
22 attribute float value;
23 readonly attribute float defaultValue;
24 readonly attribute float minValue;
25 readonly attribute float maxValue;
27 // Parameter automation.
29 AudioParam setValueAtTime(float value, double startTime);
31 AudioParam linearRampToValueAtTime(float value, double endTime);
33 AudioParam exponentialRampToValueAtTime(float value, double endTime);
35 // Exponentially approach the target value with a rate having the given time constant.
37 AudioParam setTargetAtTime(float target, double startTime, double timeConstant);
39 // Sets an array of arbitrary parameter values starting at time for the given duration.
40 // The number of values will be scaled to fit into the desired duration.
42 AudioParam setValueCurveAtTime(sequence<float> values, double startTime, double duration);
44 // Cancels all scheduled parameter changes with times greater than or equal to startTime.
46 AudioParam cancelScheduledValues(double startTime);
51 partial interface AudioParam {
52 // The ID of the AudioNode this AudioParam belongs to.
54 readonly attribute unsigned long parentNodeId;
55 // The name of the AudioParam
57 readonly attribute DOMString name;
60 partial interface AudioParam {
61 // This attribute is used for mochitest only.
63 readonly attribute boolean isTrackSuspended;