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://webaudio.github.io/web-audio-api/
8 *
9 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10 * liability, trademark and document use rules apply.
11 */
12
13[Pref="dom.webaudio.enabled"]
14interface AudioParam {
15
16                    attribute float value;
17    readonly        attribute float defaultValue;
18    readonly        attribute float minValue;
19    readonly        attribute float maxValue;
20
21    // Parameter automation.
22    [Throws]
23    AudioParam setValueAtTime(float value, double startTime);
24    [Throws]
25    AudioParam linearRampToValueAtTime(float value, double endTime);
26    [Throws]
27    AudioParam exponentialRampToValueAtTime(float value, double endTime);
28
29    // Exponentially approach the target value with a rate having the given time constant.
30    [Throws]
31    AudioParam setTargetAtTime(float target, double startTime, double timeConstant);
32
33    // Sets an array of arbitrary parameter values starting at time for the given duration.
34    // The number of values will be scaled to fit into the desired duration.
35    [Throws]
36    AudioParam setValueCurveAtTime(Float32Array values, double startTime, double duration);
37
38    // Cancels all scheduled parameter changes with times greater than or equal to startTime.
39    [Throws]
40    AudioParam cancelScheduledValues(double startTime);
41
42};
43