2023-05-21 16:36:22 -03:00
|
|
|
#import <DOM/EventTarget.idl>
|
2023-06-27 14:34:51 -03:00
|
|
|
#import <DOM/EventHandler.idl>
|
2024-05-25 20:56:11 -03:00
|
|
|
#import <WebAudio/AudioBuffer.idl>
|
2024-07-21 09:24:25 -03:00
|
|
|
#import <WebAudio/AudioBufferSourceNode.idl>
|
2024-07-24 02:50:06 -03:00
|
|
|
#import <WebAudio/AudioDestinationNode.idl>
|
2024-10-17 16:26:01 -03:00
|
|
|
#import <WebAudio/AudioListener.idl>
|
2024-11-25 10:30:36 -03:00
|
|
|
#import <WebAudio/ChannelMergerNode.idl>
|
2024-05-04 20:18:02 -03:00
|
|
|
#import <WebAudio/DynamicsCompressorNode.idl>
|
2024-05-28 00:48:10 -03:00
|
|
|
#import <WebAudio/GainNode.idl>
|
2024-04-27 21:07:14 -03:00
|
|
|
#import <WebAudio/OscillatorNode.idl>
|
2024-12-13 18:41:06 -03:00
|
|
|
#import <WebAudio/PannerNode.idl>
|
2024-10-14 19:42:26 -03:00
|
|
|
#import <WebIDL/DOMException.idl>
|
2023-06-27 14:34:51 -03:00
|
|
|
|
|
|
|
|
// https://www.w3.org/TR/webaudio/#enumdef-audiocontextstate
|
|
|
|
|
enum AudioContextState { "suspended", "running", "closed" };
|
|
|
|
|
|
2024-10-14 19:42:26 -03:00
|
|
|
callback DecodeErrorCallback = undefined (DOMException error);
|
2023-06-27 14:34:51 -03:00
|
|
|
|
2024-10-14 19:42:26 -03:00
|
|
|
callback DecodeSuccessCallback = undefined (AudioBuffer decodedData);
|
2023-05-21 16:36:22 -03:00
|
|
|
|
|
|
|
|
// https://webaudio.github.io/web-audio-api/#BaseAudioContext
|
|
|
|
|
[Exposed=Window]
|
|
|
|
|
interface BaseAudioContext : EventTarget {
|
2024-07-24 02:50:06 -03:00
|
|
|
readonly attribute AudioDestinationNode destination;
|
2023-06-27 14:34:51 -03:00
|
|
|
readonly attribute float sampleRate;
|
|
|
|
|
readonly attribute double currentTime;
|
2024-10-17 16:26:01 -03:00
|
|
|
readonly attribute AudioListener listener;
|
2023-06-27 14:34:51 -03:00
|
|
|
readonly attribute AudioContextState state;
|
2025-07-13 17:57:07 -03:00
|
|
|
readonly attribute unsigned long renderQuantumSize;
|
2023-06-27 14:34:51 -03:00
|
|
|
// FIXME: [SameObject, SecureContext]
|
2024-05-19 07:15:54 -03:00
|
|
|
[FIXME] readonly attribute AudioWorklet audioWorklet;
|
2023-06-27 14:34:51 -03:00
|
|
|
attribute EventHandler onstatechange;
|
|
|
|
|
|
2024-09-18 10:09:18 -03:00
|
|
|
AnalyserNode createAnalyser ();
|
2024-07-21 15:25:14 -03:00
|
|
|
BiquadFilterNode createBiquadFilter ();
|
2024-05-25 20:56:11 -03:00
|
|
|
AudioBuffer createBuffer(unsigned long numberOfChannels, unsigned long length, float sampleRate);
|
2024-07-21 09:24:25 -03:00
|
|
|
AudioBufferSourceNode createBufferSource ();
|
2024-11-25 10:30:36 -03:00
|
|
|
ChannelMergerNode createChannelMerger (optional unsigned long numberOfInputs = 6);
|
2025-01-01 19:04:49 -03:00
|
|
|
ChannelSplitterNode createChannelSplitter (optional unsigned long numberOfOutputs = 6);
|
2025-01-02 07:25:21 -03:00
|
|
|
ConstantSourceNode createConstantSource ();
|
2024-05-19 07:15:54 -03:00
|
|
|
[FIXME] ConvolverNode createConvolver ();
|
2025-01-03 21:39:02 -03:00
|
|
|
DelayNode createDelay (optional double maxDelayTime = 1.0);
|
2024-05-04 20:18:02 -03:00
|
|
|
DynamicsCompressorNode createDynamicsCompressor();
|
2024-05-28 00:48:10 -03:00
|
|
|
GainNode createGain();
|
2024-05-19 07:15:54 -03:00
|
|
|
[FIXME] IIRFilterNode createIIRFilter (sequence<double> feedforward, sequence<double> feedback);
|
2024-04-27 21:07:14 -03:00
|
|
|
OscillatorNode createOscillator();
|
2024-12-13 18:41:06 -03:00
|
|
|
PannerNode createPanner();
|
2025-01-02 09:40:56 -03:00
|
|
|
PeriodicWave createPeriodicWave (sequence<float> real, sequence<float> imag, optional PeriodicWaveConstraints constraints = {});
|
2025-07-25 04:45:13 -03:00
|
|
|
ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0, optional unsigned long numberOfInputChannels = 2, optional unsigned long numberOfOutputChannels = 2);
|
2025-01-17 12:00:24 -03:00
|
|
|
StereoPannerNode createStereoPanner ();
|
2024-05-19 07:15:54 -03:00
|
|
|
[FIXME] WaveShaperNode createWaveShaper ();
|
2023-06-27 14:34:51 -03:00
|
|
|
|
2024-10-14 19:42:26 -03:00
|
|
|
Promise<AudioBuffer> decodeAudioData (ArrayBuffer audioData, optional DecodeSuccessCallback? successCallback, optional DecodeErrorCallback? errorCallback);
|
2023-05-21 16:36:22 -03:00
|
|
|
};
|