ladybird/Userland/Libraries/LibWeb/WebAudio/AudioNode.idl
Shannon Booth b48ba823b9 LibWeb: Implement AudioNode.context
This is just a simple getter which returns the audio context that
created this audio node.
2024-05-04 14:01:38 +02:00

46 lines
1.7 KiB
Text

#import <WebAudio/AudioParam.idl>
#import <WebAudio/BaseAudioContext.idl>
// https://webaudio.github.io/web-audio-api/#enumdef-channelcountmode
enum ChannelCountMode {
"max",
"clamped-max",
"explicit"
};
// https://webaudio.github.io/web-audio-api/#enumdef-channelinterpretation
enum ChannelInterpretation {
"speakers",
"discrete"
};
// https://webaudio.github.io/web-audio-api/#AudioNodeOptions
dictionary AudioNodeOptions {
unsigned long channelCount;
ChannelCountMode channelCountMode;
ChannelInterpretation channelInterpretation;
};
// https://webaudio.github.io/web-audio-api/#AudioNode
[Exposed=Window]
interface AudioNode : EventTarget {
AudioNode connect(AudioNode destinationNode,
optional unsigned long output = 0,
optional unsigned long input = 0);
undefined connect(AudioParam destinationParam, optional unsigned long output = 0);
undefined disconnect();
undefined disconnect(unsigned long output);
undefined disconnect(AudioNode destinationNode);
undefined disconnect(AudioNode destinationNode, unsigned long output);
undefined disconnect(AudioNode destinationNode,
unsigned long output,
unsigned long input);
undefined disconnect(AudioParam destinationParam);
undefined disconnect(AudioParam destinationParam, unsigned long output);
readonly attribute BaseAudioContext context;
// FIXME: readonly attribute unsigned long numberOfInputs;
// FIXME: readonly attribute unsigned long numberOfOutputs;
// FIXME: attribute unsigned long channelCount;
// FIXME: attribute ChannelCountMode channelCountMode;
// FIXME: attribute ChannelInterpretation channelInterpretation;
};