mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 04:22:28 +00:00
LibWeb: Add stub IDL interface for OscillatorNode
This source node generates a periodic wave form.
This commit is contained in:
parent
c9b2c1c747
commit
a83f4216a5
Notes:
sideshowbarker
2024-07-17 11:30:05 +09:00
Author: https://github.com/shannonbooth
Commit: a83f4216a5
Pull-request: https://github.com/SerenityOS/serenity/pull/24143
6 changed files with 109 additions and 0 deletions
29
Userland/Libraries/LibWeb/WebAudio/OscillatorNode.idl
Normal file
29
Userland/Libraries/LibWeb/WebAudio/OscillatorNode.idl
Normal 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);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue