2012-10-17 05:19:06 +04:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* The origin of this IDL file is
|
2016-06-29 12:30:13 +03:00
|
|
|
* https://webaudio.github.io/web-audio-api/
|
2012-10-17 05:19:06 +04:00
|
|
|
*
|
|
|
|
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
|
|
|
* liability, trademark and document use rules apply.
|
|
|
|
*/
|
|
|
|
|
2016-07-22 14:59:52 +03:00
|
|
|
[Pref="dom.webaudio.enabled"]
|
2012-10-17 05:19:06 +04:00
|
|
|
interface AudioParam {
|
|
|
|
|
2016-12-21 12:53:38 +03:00
|
|
|
attribute float value;
|
|
|
|
readonly attribute float defaultValue;
|
|
|
|
readonly attribute float minValue;
|
|
|
|
readonly attribute float maxValue;
|
2012-10-17 05:19:06 +04:00
|
|
|
|
|
|
|
// Parameter automation.
|
|
|
|
[Throws]
|
2016-04-19 15:52:27 +03:00
|
|
|
AudioParam setValueAtTime(float value, double startTime);
|
2012-10-17 05:19:06 +04:00
|
|
|
[Throws]
|
2016-04-19 15:52:27 +03:00
|
|
|
AudioParam linearRampToValueAtTime(float value, double endTime);
|
2012-10-17 05:19:06 +04:00
|
|
|
[Throws]
|
2016-04-19 15:52:27 +03:00
|
|
|
AudioParam exponentialRampToValueAtTime(float value, double endTime);
|
2012-10-17 05:19:06 +04:00
|
|
|
|
|
|
|
// Exponentially approach the target value with a rate having the given time constant.
|
|
|
|
[Throws]
|
2016-04-19 15:52:27 +03:00
|
|
|
AudioParam setTargetAtTime(float target, double startTime, double timeConstant);
|
2012-10-17 05:19:06 +04:00
|
|
|
|
|
|
|
// Sets an array of arbitrary parameter values starting at time for the given duration.
|
|
|
|
// The number of values will be scaled to fit into the desired duration.
|
2013-05-07 03:50:45 +04:00
|
|
|
[Throws]
|
2016-04-19 15:52:27 +03:00
|
|
|
AudioParam setValueCurveAtTime(Float32Array values, double startTime, double duration);
|
2012-10-17 05:19:06 +04:00
|
|
|
|
|
|
|
// Cancels all scheduled parameter changes with times greater than or equal to startTime.
|
2013-05-31 04:53:15 +04:00
|
|
|
[Throws]
|
2016-04-19 15:52:27 +03:00
|
|
|
AudioParam cancelScheduledValues(double startTime);
|
2012-10-17 05:19:06 +04:00
|
|
|
|
|
|
|
};
|
2015-04-14 18:03:52 +03:00
|
|
|
|
|
|
|
// Mozilla extension
|
|
|
|
partial interface AudioParam {
|
|
|
|
// The ID of the AudioNode this AudioParam belongs to.
|
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute unsigned long parentNodeId;
|
|
|
|
// The name of the AudioParam
|
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute DOMString name;
|
|
|
|
};
|