mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Initial AudioParam bindings
This commit is contained in:
parent
885addfaae
commit
7380f69f77
8 changed files with 187 additions and 55 deletions
|
@ -6,18 +6,24 @@
|
|||
* https://webaudio.github.io/web-audio-api/#dom-audioparam
|
||||
*/
|
||||
|
||||
enum AutomationRate {
|
||||
"a-rate",
|
||||
"k-rate"
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface AudioParam {
|
||||
attribute float value;
|
||||
attribute AutomationRate automationRate;
|
||||
readonly attribute float defaultValue;
|
||||
readonly attribute float minValue;
|
||||
readonly attribute float maxValue;
|
||||
// AudioParam setValueAtTime(float value, double startTime);
|
||||
// AudioParam linearRampToValueAtTime(float value, double endTime);
|
||||
// AudioParam exponentialRampToValueAtTime(float value, double endTime);
|
||||
// AudioParam setTargetAtTime(float target,
|
||||
// double startTime,
|
||||
// float timeConstant);
|
||||
AudioParam setValueAtTime(float value, double startTime);
|
||||
AudioParam linearRampToValueAtTime(float value, double endTime);
|
||||
AudioParam exponentialRampToValueAtTime(float value, double endTime);
|
||||
AudioParam setTargetAtTime(float target,
|
||||
double startTime,
|
||||
float timeConstant);
|
||||
// AudioParam setValueCurveAtTime(sequence<float> values,
|
||||
// double startTime,
|
||||
// double duration);
|
||||
|
|
|
@ -24,11 +24,11 @@ dictionary OscillatorOptions : AudioNodeOptions {
|
|||
[Exposed=Window,
|
||||
Constructor (BaseAudioContext context, optional OscillatorOptions options)]
|
||||
interface OscillatorNode : AudioScheduledSourceNode {
|
||||
/* [SetterThrows]
|
||||
attribute OscillatorType type;
|
||||
// [SetterThrows]
|
||||
// attribute OscillatorType type;
|
||||
|
||||
readonly attribute AudioParam frequency;
|
||||
readonly attribute AudioParam detune;
|
||||
// readonly attribute AudioParam detune;
|
||||
|
||||
void setPeriodicWave (PeriodicWave periodicWave);*/
|
||||
// void setPeriodicWave (PeriodicWave periodicWave);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue