ladybird/Userland/Libraries/LibWeb/WebAudio/OscillatorNode.idl
Shannon Booth 4fe0cbcf85 LibWeb: Use 'FIXME' extended attribute where possible
This improves the debuggability of many live web pages :^)
2024-05-19 16:24:11 +02:00

30 lines
895 B
Plaintext

#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 = {});
attribute OscillatorType type;
readonly attribute AudioParam frequency;
[FIXME] readonly attribute AudioParam detune;
[FIXME] undefined setPeriodicWave(PeriodicWave periodicWave);
};