2012-10-16 18:19:06 -07: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
|
|
|
|
* https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
|
|
|
|
*
|
|
|
|
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
|
|
|
* liability, trademark and document use rules apply.
|
|
|
|
*/
|
|
|
|
|
|
|
|
interface AudioParam {
|
|
|
|
|
|
|
|
attribute float value;
|
|
|
|
readonly attribute float defaultValue;
|
|
|
|
|
|
|
|
// Parameter automation.
|
|
|
|
[Throws]
|
2012-11-19 12:52:29 -08:00
|
|
|
void setValueAtTime(float value, double startTime);
|
2012-10-16 18:19:06 -07:00
|
|
|
[Throws]
|
2012-11-19 12:52:29 -08:00
|
|
|
void linearRampToValueAtTime(float value, double endTime);
|
2012-10-16 18:19:06 -07:00
|
|
|
[Throws]
|
2012-11-19 12:52:29 -08:00
|
|
|
void exponentialRampToValueAtTime(float value, double endTime);
|
2012-10-16 18:19:06 -07:00
|
|
|
|
|
|
|
// Exponentially approach the target value with a rate having the given time constant.
|
|
|
|
[Throws]
|
2012-11-19 12:52:29 -08:00
|
|
|
void setTargetAtTime(float target, double startTime, double timeConstant);
|
2012-10-16 18:19:06 -07: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-06 16:50:45 -07:00
|
|
|
[Throws]
|
|
|
|
void setValueCurveAtTime(Float32Array values, double startTime, double duration);
|
2012-10-16 18:19:06 -07:00
|
|
|
|
|
|
|
// Cancels all scheduled parameter changes with times greater than or equal to startTime.
|
2013-05-30 17:53:15 -07:00
|
|
|
[Throws]
|
2012-11-19 12:52:29 -08:00
|
|
|
void cancelScheduledValues(double startTime);
|
2012-10-16 18:19:06 -07:00
|
|
|
|
|
|
|
};
|