#import #import #import #import #import #import #import #import #import #import // https://www.w3.org/TR/webaudio/#enumdef-audiocontextstate enum AudioContextState { "suspended", "running", "closed" }; callback DecodeErrorCallback = undefined (DOMException error); callback DecodeSuccessCallback = undefined (AudioBuffer decodedData); // https://webaudio.github.io/web-audio-api/#BaseAudioContext [Exposed=Window] interface BaseAudioContext : EventTarget { readonly attribute AudioDestinationNode destination; readonly attribute float sampleRate; readonly attribute double currentTime; readonly attribute AudioListener listener; readonly attribute AudioContextState state; // FIXME: [SameObject, SecureContext] [FIXME] readonly attribute AudioWorklet audioWorklet; attribute EventHandler onstatechange; [FIXME] AnalyserNode createAnalyser (); BiquadFilterNode createBiquadFilter (); AudioBuffer createBuffer(unsigned long numberOfChannels, unsigned long length, float sampleRate); AudioBufferSourceNode createBufferSource (); [FIXME] ChannelMergerNode createChannelMerger (optional unsigned long numberOfInputs = 6); [FIXME] ChannelSplitterNode createChannelSplitter (optional unsigned long numberOfOutputs = 6); [FIXME] ConstantSourceNode createConstantSource (); [FIXME] ConvolverNode createConvolver (); [FIXME] DelayNode createDelay (optional double maxDelayTime = 1.0); DynamicsCompressorNode createDynamicsCompressor(); GainNode createGain(); [FIXME] IIRFilterNode createIIRFilter (sequence feedforward, sequence feedback); OscillatorNode createOscillator(); [FIXME] PannerNode createPanner (); [FIXME] PeriodicWave createPeriodicWave (sequence real, sequence imag, optional PeriodicWaveConstraints constraints = {}); [FIXME] ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0, optional unsigned long numberOfInputChannels = 2, optional unsigned long numberOfOutputChannels = 2); [FIXME] StereoPannerNode createStereoPanner (); [FIXME] WaveShaperNode createWaveShaper (); Promise decodeAudioData (ArrayBuffer audioData, optional DecodeSuccessCallback? successCallback, optional DecodeErrorCallback? errorCallback); };