BaseAudioContext.idl 2.4 KB

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