LibWeb: Add stub IDL interface for OscillatorNode

This source node generates a periodic wave form.
This commit is contained in:
Shannon Booth 2024-04-28 13:29:14 +12:00 committed by Andreas Kling
commit a83f4216a5
Notes: sideshowbarker 2024-07-17 11:30:05 +09:00
6 changed files with 109 additions and 0 deletions

View file

@ -0,0 +1,29 @@
#import <WebAudio/AudioScheduledSourceNode.idl>
#import <WebAudio/PeriodicWave.idl>
// https://webaudio.github.io/web-audio-api/#enumdef-oscillatortype
enum OscillatorType {
"sine",
"square",
"sawtooth",
"triangle",
"custom"
};
// https://webaudio.github.io/web-audio-api/#OscillatorOptions
dictionary OscillatorOptions : AudioNodeOptions {
OscillatorType type = "sine";
float frequency = 440;
float detune = 0;
PeriodicWave periodicWave;
};
// https://webaudio.github.io/web-audio-api/#OscillatorNode
[Exposed=Window]
interface OscillatorNode : AudioScheduledSourceNode {
constructor(BaseAudioContext context, optional OscillatorOptions options = {});
// FIXME: attribute OscillatorType type;
// FIXME: readonly attribute AudioParam frequency;
// FIXME: readonly attribute AudioParam detune;
// FIXME: undefined setPeriodicWave(PeriodicWave periodicWave);
};