BaseAudioContext.idl 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #import <DOM/EventTarget.idl>
  2. #import <DOM/EventHandler.idl>
  3. // https://www.w3.org/TR/webaudio/#enumdef-audiocontextstate
  4. enum AudioContextState { "suspended", "running", "closed" };
  5. // FIXME: callback DecodeErrorCallback = undefined (DOMException error);
  6. // FIXME: callback DecodeSuccessCallback = undefined (AudioBuffer decodedData);
  7. // https://webaudio.github.io/web-audio-api/#BaseAudioContext
  8. [Exposed=Window]
  9. interface BaseAudioContext : EventTarget {
  10. // FIXME: readonly attribute AudioDestinationNode destination;
  11. readonly attribute float sampleRate;
  12. readonly attribute double currentTime;
  13. // FIXME: readonly attribute AudioListener listener;
  14. readonly attribute AudioContextState state;
  15. // FIXME: [SameObject, SecureContext]
  16. // readonly attribute AudioWorklet audioWorklet;
  17. attribute EventHandler onstatechange;
  18. // FIXME: AnalyserNode createAnalyser ();
  19. // FIXME: BiquadFilterNode createBiquadFilter ();
  20. // FIXME: AudioBuffer createBuffer (unsigned long numberOfChannels, unsigned long length, float sampleRate);
  21. // FIXME: AudioBufferSourceNode createBufferSource ();
  22. // FIXME: ChannelMergerNode createChannelMerger (optional unsigned long numberOfInputs = 6);
  23. // FIXME: ChannelSplitterNode createChannelSplitter (optional unsigned long numberOfOutputs = 6);
  24. // FIXME: ConstantSourceNode createConstantSource ();
  25. // FIXME: ConvolverNode createConvolver ();
  26. // FIXME: DelayNode createDelay (optional double maxDelayTime = 1.0);
  27. // FIXME: DynamicsCompressorNode createDynamicsCompressor ();
  28. // FIXME: GainNode createGain ();
  29. // FIXME: IIRFilterNode createIIRFilter (sequence<double> feedforward, sequence<double> feedback);
  30. // FIXME: OscillatorNode createOscillator ();
  31. // FIXME: PannerNode createPanner ();
  32. // FIXME: PeriodicWave createPeriodicWave (sequence<float> real, sequence<float> imag, optional PeriodicWaveConstraints constraints = {});
  33. // FIXME: ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0, optional unsigned long numberOfInputChannels = 2, optional unsigned long numberOfOutputChannels = 2);
  34. // FIXME: StereoPannerNode createStereoPanner ();
  35. // FIXME: WaveShaperNode createWaveShaper ();
  36. // FIXME: Promise<AudioBuffer> decodeAudioData (ArrayBuffer audioData, optional DecodeSuccessCallback? successCallback, optional DecodeErrorCallback? errorCallback);
  37. };