зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1470045 [wpt PR 11595] - Auto-update the webaudio IDL file, a=testonly
Automatic update from web-platform-testsAuto-update the webaudio IDL file (#11595) -- wpt-commits: 37f154addf55b4608276c85bd085ca36e70c417c wpt-pr: 11595
This commit is contained in:
Родитель
7c5dd42143
Коммит
53775758af
|
@ -289013,11 +289013,6 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"interfaces/web-audio-api.idl": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"interfaces/web-bluetooth.idl": [
|
||||
[
|
||||
{}
|
||||
|
@ -289033,6 +289028,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"interfaces/webaudio.idl": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"interfaces/webauthn.idl": [
|
||||
[
|
||||
{}
|
||||
|
@ -592046,10 +592046,6 @@
|
|||
"a68224b17684bd43309bef57e7ad835f5f324a3a",
|
||||
"support"
|
||||
],
|
||||
"interfaces/web-audio-api.idl": [
|
||||
"6e6a41a2b1dfde69171a8d28252cc3354c86b83e",
|
||||
"support"
|
||||
],
|
||||
"interfaces/web-bluetooth.idl": [
|
||||
"48e51b15f2338d6b3b0a8c0a013b4f1bfdf6ca1f",
|
||||
"support"
|
||||
|
@ -592062,6 +592058,10 @@
|
|||
"21b54128664c5962c29fd708ebba3d8d90987f26",
|
||||
"support"
|
||||
],
|
||||
"interfaces/webaudio.idl": [
|
||||
"a2adb319de88d1d33080a837972caefa5c5c1946",
|
||||
"support"
|
||||
],
|
||||
"interfaces/webauthn.idl": [
|
||||
"1ae8b428644479b352fd5b1996677fd4dcdbb84b",
|
||||
"support"
|
||||
|
@ -622751,7 +622751,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"webaudio/idlharness.https.html": [
|
||||
"af74995e367b63d17b5dea6bd2bfa9646ab08798",
|
||||
"ce6a8abcc0eb9863b0515d6ec2f16e7b42b4151c",
|
||||
"testharness"
|
||||
],
|
||||
"webaudio/js/buffer-loader.js": [
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content of this file was automatically extracted from the Web Audio API spec.
|
||||
// See https://webaudio.github.io/web-audio-api/
|
||||
// Content of this file was automatically extracted from the
|
||||
// "Web Audio API" spec.
|
||||
// See: https://webaudio.github.io/web-audio-api/
|
||||
|
||||
enum AudioContextState {
|
||||
"suspended",
|
||||
|
@ -21,34 +22,35 @@ interface BaseAudioContext : EventTarget {
|
|||
readonly attribute AudioContextState state;
|
||||
[SameObject, SecureContext]
|
||||
readonly attribute AudioWorklet audioWorklet;
|
||||
Promise<void> resume ();
|
||||
attribute EventHandler onstatechange;
|
||||
|
||||
AnalyserNode createAnalyser ();
|
||||
BiquadFilterNode createBiquadFilter ();
|
||||
AudioBuffer createBuffer (unsigned long numberOfChannels, unsigned long length, float sampleRate);
|
||||
Promise<AudioBuffer> decodeAudioData (ArrayBuffer audioData,
|
||||
optional DecodeSuccessCallback successCallback,
|
||||
optional DecodeErrorCallback errorCallback);
|
||||
AudioBufferSourceNode createBufferSource ();
|
||||
ChannelMergerNode createChannelMerger (optional unsigned long numberOfInputs = 6);
|
||||
ChannelSplitterNode createChannelSplitter (optional unsigned long numberOfOutputs = 6);
|
||||
ConstantSourceNode createConstantSource ();
|
||||
ConvolverNode createConvolver ();
|
||||
DelayNode createDelay (optional double maxDelayTime = 1.0);
|
||||
DynamicsCompressorNode createDynamicsCompressor ();
|
||||
GainNode createGain ();
|
||||
IIRFilterNode createIIRFilter (sequence<double> feedforward, sequence<double> feedback);
|
||||
OscillatorNode createOscillator ();
|
||||
PannerNode createPanner ();
|
||||
PeriodicWave createPeriodicWave (sequence<float> real, sequence<float> imag, optional PeriodicWaveConstraints constraints);
|
||||
ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0,
|
||||
optional unsigned long numberOfInputChannels = 2,
|
||||
optional unsigned long numberOfOutputChannels = 2);
|
||||
AnalyserNode createAnalyser ();
|
||||
GainNode createGain ();
|
||||
DelayNode createDelay (optional double maxDelayTime = 1.0);
|
||||
BiquadFilterNode createBiquadFilter ();
|
||||
IIRFilterNode createIIRFilter (sequence<double> feedforward, sequence<double> feedback);
|
||||
WaveShaperNode createWaveShaper ();
|
||||
PannerNode createPanner ();
|
||||
StereoPannerNode createStereoPanner ();
|
||||
ConvolverNode createConvolver ();
|
||||
ChannelSplitterNode createChannelSplitter (optional unsigned long numberOfOutputs = 6);
|
||||
ChannelMergerNode createChannelMerger (optional unsigned long numberOfInputs = 6);
|
||||
DynamicsCompressorNode createDynamicsCompressor ();
|
||||
OscillatorNode createOscillator ();
|
||||
PeriodicWave createPeriodicWave (sequence<float> real, sequence<float> imag, optional PeriodicWaveConstraints constraints);
|
||||
WaveShaperNode createWaveShaper ();
|
||||
|
||||
Promise<AudioBuffer> decodeAudioData (ArrayBuffer audioData,
|
||||
optional DecodeSuccessCallback successCallback,
|
||||
optional DecodeErrorCallback errorCallback);
|
||||
Promise<void> resume ();
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
enum AudioContextLatencyCategory {
|
||||
"balanced",
|
||||
"interactive",
|
||||
|
@ -69,13 +71,11 @@ interface AudioContext : BaseAudioContext {
|
|||
MediaStreamAudioDestinationNode createMediaStreamDestination ();
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
dictionary AudioContextOptions {
|
||||
(AudioContextLatencyCategory or double) latencyHint = "interactive";
|
||||
float sampleRate;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
dictionary AudioTimestamp {
|
||||
double contextTime;
|
||||
DOMHighResTimeStamp performanceTime;
|
||||
|
@ -91,7 +91,6 @@ interface OfflineAudioContext : BaseAudioContext {
|
|||
attribute EventHandler oncomplete;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
dictionary OfflineAudioContextOptions {
|
||||
unsigned long numberOfChannels = 1;
|
||||
required unsigned long length;
|
||||
|
@ -104,7 +103,6 @@ interface OfflineAudioCompletionEvent : Event {
|
|||
readonly attribute AudioBuffer renderedBuffer;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
dictionary OfflineAudioCompletionEventInit : EventInit {
|
||||
required AudioBuffer renderedBuffer;
|
||||
};
|
||||
|
@ -148,14 +146,12 @@ interface AudioNode : EventTarget {
|
|||
attribute ChannelInterpretation channelInterpretation;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
enum ChannelCountMode {
|
||||
"max",
|
||||
"clamped-max",
|
||||
"explicit"
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
enum ChannelInterpretation {
|
||||
"speakers",
|
||||
"discrete"
|
||||
|
@ -228,7 +224,6 @@ interface AudioBufferSourceNode : AudioScheduledSourceNode {
|
|||
void start (optional double when = 0,
|
||||
optional double offset,
|
||||
optional double duration);
|
||||
void stop (optional double when = 0);
|
||||
};
|
||||
|
||||
dictionary AudioBufferSourceOptions {
|
||||
|
@ -314,7 +309,7 @@ dictionary ChannelMergerOptions : AudioNodeOptions {
|
|||
};
|
||||
|
||||
[Exposed=Window,
|
||||
Constructor (BaseAudioContext context, optional ChannelSplitterNode options)]
|
||||
Constructor (BaseAudioContext context, optional ChannelSplitterOptions options)]
|
||||
interface ChannelSplitterNode : AudioNode {
|
||||
};
|
||||
|
||||
|
@ -396,7 +391,7 @@ dictionary IIRFilterOptions : AudioNodeOptions {
|
|||
};
|
||||
|
||||
[Exposed=Window,
|
||||
Constructor (BaseAudioContext context, MediaElementAudioSourceOptions options)]
|
||||
Constructor (AudioContext context, MediaElementAudioSourceOptions options)]
|
||||
interface MediaElementAudioSourceNode : AudioNode {
|
||||
[SameObject] readonly attribute HTMLMediaElement mediaElement;
|
||||
};
|
||||
|
@ -406,13 +401,13 @@ dictionary MediaElementAudioSourceOptions {
|
|||
};
|
||||
|
||||
[Exposed=Window,
|
||||
Constructor (BaseAudioContext context, optional AudioNodeOptions options)]
|
||||
Constructor (AudioContext context, optional AudioNodeOptions options)]
|
||||
interface MediaStreamAudioDestinationNode : AudioNode {
|
||||
readonly attribute MediaStream stream;
|
||||
};
|
||||
|
||||
[Exposed=Window,
|
||||
Constructor (BaseAudioContext context, MediaStreamAudioSourceOptions options)]
|
||||
Constructor (AudioContext context, MediaStreamAudioSourceOptions options)]
|
||||
interface MediaStreamAudioSourceNode : AudioNode {
|
||||
[SameObject] readonly attribute MediaStream mediaStream;
|
||||
};
|
||||
|
@ -558,6 +553,7 @@ interface AudioWorklet : Worklet {
|
|||
[Global=(Worklet, AudioWorklet), Exposed=AudioWorklet]
|
||||
interface AudioWorkletGlobalScope : WorkletGlobalScope {
|
||||
void registerProcessor (DOMString name, VoidFunction processorCtor);
|
||||
readonly attribute unsigned long long currentFrame;
|
||||
readonly attribute double currentTime;
|
||||
readonly attribute float sampleRate;
|
||||
};
|
||||
|
@ -567,21 +563,13 @@ interface AudioParamMap {
|
|||
readonly maplike<DOMString, AudioParam>;
|
||||
};
|
||||
|
||||
enum AudioWorkletProcessorState {
|
||||
"pending",
|
||||
"running",
|
||||
"stopped",
|
||||
"error"
|
||||
};
|
||||
|
||||
[Exposed=Window,
|
||||
SecureContext,
|
||||
Constructor (BaseAudioContext context, DOMString name, optional AudioWorkletNodeOptions options)]
|
||||
interface AudioWorkletNode : AudioNode {
|
||||
readonly attribute AudioParamMap parameters;
|
||||
readonly attribute MessagePort port;
|
||||
readonly attribute AudioWorkletProcessorState processorState;
|
||||
attribute EventHandler onprocessorstatechange;
|
||||
attribute EventHandler onprocessorerror;
|
||||
};
|
||||
|
||||
dictionary AudioWorkletNodeOptions : AudioNodeOptions {
|
||||
|
@ -589,7 +577,7 @@ dictionary AudioWorkletNodeOptions : AudioNodeOptions {
|
|||
unsigned long numberOfOutputs = 1;
|
||||
sequence<unsigned long> outputChannelCount;
|
||||
record<DOMString, double> parameterData;
|
||||
object processorOptions = null;
|
||||
object? processorOptions = null;
|
||||
};
|
||||
|
||||
[Exposed=AudioWorklet,
|
||||
|
@ -603,4 +591,5 @@ dictionary AudioParamDescriptor {
|
|||
float defaultValue = 0;
|
||||
float minValue = -3.4028235e38;
|
||||
float maxValue = 3.4028235e38;
|
||||
AutomationRate automationRate = "a-rate";
|
||||
};
|
|
@ -10,13 +10,13 @@
|
|||
<script>
|
||||
'use strict';
|
||||
|
||||
let sample_rate, context, buffer, worklet_node;
|
||||
|
||||
promise_test(async t => {
|
||||
const cssom = await fetch('/interfaces/cssom.idl').then(r => r.text());
|
||||
const dom = await fetch('/interfaces/dom.idl').then(r => r.text());
|
||||
const html = await fetch('/interfaces/html.idl').then(r => r.text());
|
||||
const uievents = await fetch('/interfaces/uievents.idl').then(r => r.text());
|
||||
const mediacapture = await fetch('/interfaces/mediacapture-main.idl').then(r => r.text());
|
||||
const webaudio = await fetch('/interfaces/web-audio-api.idl').then(r => r.text());
|
||||
const srcs = ['cssom', 'dom', 'html', 'uievents', 'mediacapture-main', 'webaudio'];
|
||||
const [cssom, dom, html, uievents, mediacapture, webaudio] =
|
||||
await Promise.all(
|
||||
srcs.map(i => fetch(`/interfaces/${i}.idl`).then(r => r.text())));
|
||||
|
||||
const idl_array = new IdlArray();
|
||||
idl_array.add_idls(webaudio);
|
||||
|
@ -32,56 +32,63 @@ promise_test(async t => {
|
|||
idl_array.add_untested_idls('interface WorkletGlobalScope {};');
|
||||
idl_array.add_untested_idls('interface Worklet {};');
|
||||
|
||||
const sample_rate = 44100;
|
||||
const context = new AudioContext;
|
||||
const buffer = new AudioBuffer({length: 1, sampleRate: sample_rate});
|
||||
try {
|
||||
sample_rate = 44100;
|
||||
context = new AudioContext;
|
||||
buffer = new AudioBuffer({length: 1, sampleRate: sample_rate});
|
||||
await context.audioWorklet.addModule(
|
||||
'the-audio-api/the-audioworklet-interface/processors/dummy-processor.js');
|
||||
const worklet_node = new AudioWorkletNode(context, 'dummy');
|
||||
worklet_node = new AudioWorkletNode(context, 'dummy');
|
||||
} catch (e) {
|
||||
// Ignore - errors will surface in each test_object below.
|
||||
}
|
||||
|
||||
idl_array.add_objects({
|
||||
BaseAudioContext: [],
|
||||
AudioContext: [context],
|
||||
OfflineAudioContext: [new OfflineAudioContext(1, 1, sample_rate)],
|
||||
AudioContext: ['context'],
|
||||
OfflineAudioContext: ['new OfflineAudioContext(1, 1, sample_rate)'],
|
||||
OfflineAudioCompletionEvent: [
|
||||
new OfflineAudioCompletionEvent('', {renderedBuffer: buffer})],
|
||||
AudioBuffer: [buffer],
|
||||
'new OfflineAudioCompletionEvent("", {renderedBuffer: buffer})'],
|
||||
AudioBuffer: ['buffer'],
|
||||
AudioNode: [],
|
||||
AudioParam: [new AudioBufferSourceNode(context).playbackRate],
|
||||
AudioParam: ['new AudioBufferSourceNode(context).playbackRate'],
|
||||
AudioScheduledSourceNode: [],
|
||||
AnalyserNode: [new AnalyserNode(context)],
|
||||
AudioBufferSourceNode: [new AudioBufferSourceNode(context)],
|
||||
AudioDestinationNode: [context.destination],
|
||||
AudioListener: [context.listener],
|
||||
AudioProcessingEvent: [new AudioProcessingEvent('', {
|
||||
AnalyserNode: ['new AnalyserNode(context)'],
|
||||
AudioBufferSourceNode: ['new AudioBufferSourceNode(context)'],
|
||||
AudioDestinationNode: ['context.destination'],
|
||||
AudioListener: ['context.listener'],
|
||||
AudioProcessingEvent: [`new AudioProcessingEvent('', {
|
||||
playbackTime: 0, inputBuffer: buffer, outputBuffer: buffer
|
||||
})],
|
||||
BiquadFilterNode: [new BiquadFilterNode(context)],
|
||||
ChannelMergerNode: [new ChannelMergerNode(context)],
|
||||
ChannelSplitterNode: [new ChannelSplitterNode(context)],
|
||||
ConstantSourceNode: [new ConstantSourceNode(context)],
|
||||
ConvolverNode: [new ConvolverNode(context)],
|
||||
DelayNode: [new DelayNode(context)],
|
||||
DynamicsCompressorNode: [new DynamicsCompressorNode(context)],
|
||||
GainNode: [new GainNode(context)],
|
||||
})`],
|
||||
BiquadFilterNode: ['new BiquadFilterNode(context)'],
|
||||
ChannelMergerNode: ['new ChannelMergerNode(context)'],
|
||||
ChannelSplitterNode: ['new ChannelSplitterNode(context)'],
|
||||
ConstantSourceNode: ['new ConstantSourceNode(context)'],
|
||||
ConvolverNode: ['new ConvolverNode(context)'],
|
||||
DelayNode: ['new DelayNode(context)'],
|
||||
DynamicsCompressorNode: ['new DynamicsCompressorNode(context)'],
|
||||
GainNode: ['new GainNode(context)'],
|
||||
IIRFilterNode: [
|
||||
new IIRFilterNode(context, {feedforward: [1], feedback: [1]})],
|
||||
'new IIRFilterNode(context, {feedforward: [1], feedback: [1]})'
|
||||
],
|
||||
MediaElementAudioSourceNode: [
|
||||
new MediaElementAudioSourceNode(context, {mediaElement: new Audio})],
|
||||
'new MediaElementAudioSourceNode(context, {mediaElement: new Audio})'
|
||||
],
|
||||
MediaStreamAudioDestinationNode: [
|
||||
new MediaStreamAudioDestinationNode(context)],
|
||||
'new MediaStreamAudioDestinationNode(context)'
|
||||
],
|
||||
MediaStreamAudioSourceNode: [],
|
||||
MediaStreamTrackAudioSourceNode: [],
|
||||
OscillatorNode: [new OscillatorNode(context)],
|
||||
PannerNode: [new PannerNode(context)],
|
||||
PeriodicWave: [new PeriodicWave(context)],
|
||||
ScriptProcessorNode: [context.createScriptProcessor()],
|
||||
StereoPannerNode: [new StereoPannerNode(context)],
|
||||
WaveShaperNode: [new WaveShaperNode(context)],
|
||||
AudioWorklet: [context.audioWorklet],
|
||||
OscillatorNode: ['new OscillatorNode(context)'],
|
||||
PannerNode: ['new PannerNode(context)'],
|
||||
PeriodicWave: ['new PeriodicWave(context)'],
|
||||
ScriptProcessorNode: ['context.createScriptProcessor()'],
|
||||
StereoPannerNode: ['new StereoPannerNode(context)'],
|
||||
WaveShaperNode: ['new WaveShaperNode(context)'],
|
||||
AudioWorklet: ['context.audioWorklet'],
|
||||
AudioWorkletGlobalScope: [],
|
||||
AudioParamMap: [worklet_node.parameters],
|
||||
AudioWorkletNode: [worklet_node],
|
||||
AudioParamMap: ['worklet_node.parameters'],
|
||||
AudioWorkletNode: ['worklet_node'],
|
||||
AudioWorkletProcessor: [],
|
||||
});
|
||||
idl_array.test();
|
||||
|
|
Загрузка…
Ссылка в новой задаче