enum AudioContextState {
"suspended",
"running",
"interrupted",
"closed"
};
[
ActiveDOMObject,
Conditional=WEB_AUDIO,
Constructor,
ConstructorCallWith=Document,
EnabledBySetting=WebAudio,
ExportMacro=WEBCORE_EXPORT,
InterfaceName=webkitAudioContext,
] interface AudioContext : EventTarget {
readonly attribute AudioDestinationNode destination;
readonly attribute unrestricted double currentTime;
readonly attribute unrestricted float sampleRate;
readonly attribute AudioListener listener;
[ImplementedAs=suspendRendering] Promise<void> suspend();
[ImplementedAs=resumeRendering] Promise<void> resume();
Promise<void> close();
readonly attribute AudioContextState state;
attribute EventHandler onstatechange;
readonly attribute unsigned long activeSourceCount;
[MayThrowException] AudioBuffer createBuffer(unsigned long numberOfChannels, unsigned long numberOfFrames, unrestricted float sampleRate);
[MayThrowException] AudioBuffer createBuffer(ArrayBuffer buffer, boolean mixToMono);
void decodeAudioData(ArrayBuffer audioData, AudioBufferCallback? successCallback, optional AudioBufferCallback? errorCallback);
[MayThrowException] AudioBufferSourceNode createBufferSource();
[Conditional=VIDEO, MayThrowException] MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
[Conditional=MEDIA_STREAM, MayThrowException] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
[Conditional=MEDIA_STREAM, MayThrowException] MediaStreamAudioDestinationNode createMediaStreamDestination();
[MayThrowException] GainNode createGain();
[MayThrowException] DelayNode createDelay(optional unrestricted double maxDelayTime = 1);
[MayThrowException] BiquadFilterNode createBiquadFilter();
[MayThrowException] WaveShaperNode createWaveShaper();
[MayThrowException] PannerNode createPanner();
[MayThrowException] ConvolverNode createConvolver();
[MayThrowException] DynamicsCompressorNode createDynamicsCompressor();
[MayThrowException] AnalyserNode createAnalyser();
[MayThrowException] ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0, optional unsigned long numberOfInputChannels = 2, optional unsigned long numberOfOutputChannels = 2);
[MayThrowException] OscillatorNode createOscillator();
[MayThrowException] PeriodicWave createPeriodicWave(Float32Array real, Float32Array imag);
[MayThrowException] ChannelSplitterNode createChannelSplitter(optional unsigned long numberOfOutputs = 6);
[MayThrowException] ChannelMergerNode createChannelMerger(optional unsigned long numberOfInputs = 6);
attribute EventHandler oncomplete;
void startRendering();
};