| Index: pkg/dev_compiler/tool/input_sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
|
| diff --git a/pkg/dev_compiler/tool/input_sdk/lib/web_audio/dart2js/web_audio_dart2js.dart b/pkg/dev_compiler/tool/input_sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
|
| index c728a080c25995b288b86ca2a4bf89ab65f59317..e725018213e282ed76cd734b76a08d23580a7e7d 100644
|
| --- a/pkg/dev_compiler/tool/input_sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
|
| +++ b/pkg/dev_compiler/tool/input_sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
|
| @@ -101,6 +101,18 @@ class AudioBuffer extends Interceptor {
|
| @DocsEditable()
|
| final double sampleRate;
|
|
|
| + @DomName('AudioBuffer.copyFromChannel')
|
| + @DocsEditable()
|
| + @Experimental() // untriaged
|
| + void copyFromChannel(Float32List destination, int channelNumber,
|
| + [int startInChannel]) native;
|
| +
|
| + @DomName('AudioBuffer.copyToChannel')
|
| + @DocsEditable()
|
| + @Experimental() // untriaged
|
| + void copyToChannel(Float32List source, int channelNumber,
|
| + [int startInChannel]) native;
|
| +
|
| @DomName('AudioBuffer.getChannelData')
|
| @DocsEditable()
|
| Float32List getChannelData(int channelIndex) native;
|
| @@ -114,7 +126,7 @@ class AudioBuffer extends Interceptor {
|
| @DomName('AudioBufferCallback')
|
| // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBuffer-section
|
| @Experimental()
|
| -typedef void AudioBufferCallback(AudioBuffer audioBuffer);
|
| +typedef void AudioBufferCallback(audioBuffer_OR_exception);
|
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
| @@ -177,6 +189,11 @@ class AudioBufferSourceNode extends AudioSourceNode {
|
| @DocsEditable()
|
| AudioBuffer buffer;
|
|
|
| + @DomName('AudioBufferSourceNode.detune')
|
| + @DocsEditable()
|
| + @Experimental() // untriaged
|
| + final AudioParam detune;
|
| +
|
| @DomName('AudioBufferSourceNode.loop')
|
| @DocsEditable()
|
| bool loop;
|
| @@ -215,17 +232,6 @@ class AudioContext extends EventTarget {
|
| throw new UnsupportedError("Not supported");
|
| }
|
|
|
| - /**
|
| - * Static factory designed to expose `complete` events to event
|
| - * handlers that are not necessarily instances of [AudioContext].
|
| - *
|
| - * See [EventStreamProvider] for usage information.
|
| - */
|
| - @DomName('AudioContext.completeEvent')
|
| - @DocsEditable()
|
| - static const EventStreamProvider<Event> completeEvent =
|
| - const EventStreamProvider<Event>('complete');
|
| -
|
| /// Checks if this type is supported on the current platform.
|
| static bool get supported =>
|
| JS('bool', '!!(window.AudioContext || window.webkitAudioContext)');
|
| @@ -246,6 +252,16 @@ class AudioContext extends EventTarget {
|
| @DocsEditable()
|
| final double sampleRate;
|
|
|
| + @DomName('AudioContext.state')
|
| + @DocsEditable()
|
| + @Experimental() // untriaged
|
| + final String state;
|
| +
|
| + @DomName('AudioContext.close')
|
| + @DocsEditable()
|
| + @Experimental() // untriaged
|
| + Future close() native;
|
| +
|
| @DomName('AudioContext.createAnalyser')
|
| @DocsEditable()
|
| AnalyserNode createAnalyser() native;
|
| @@ -283,6 +299,13 @@ class AudioContext extends EventTarget {
|
| @DocsEditable()
|
| DynamicsCompressorNode createDynamicsCompressor() native;
|
|
|
| + @JSName('createIIRFilter')
|
| + @DomName('AudioContext.createIIRFilter')
|
| + @DocsEditable()
|
| + @Experimental() // untriaged
|
| + IirFilterNode createIirFilter(List<num> feedForward, List<num> feedBack)
|
| + native;
|
| +
|
| @DomName('AudioContext.createMediaElementSource')
|
| @DocsEditable()
|
| MediaElementAudioSourceNode createMediaElementSource(
|
| @@ -308,7 +331,31 @@ class AudioContext extends EventTarget {
|
| @DomName('AudioContext.createPeriodicWave')
|
| @DocsEditable()
|
| @Experimental() // untriaged
|
| - PeriodicWave createPeriodicWave(Float32List real, Float32List imag) native;
|
| + PeriodicWave createPeriodicWave(Float32List real, Float32List imag,
|
| + [Map options]) {
|
| + if (options != null) {
|
| + var options_1 = convertDartToNative_Dictionary(options);
|
| + return _createPeriodicWave_1(real, imag, options_1);
|
| + }
|
| + return _createPeriodicWave_2(real, imag);
|
| + }
|
| +
|
| + @JSName('createPeriodicWave')
|
| + @DomName('AudioContext.createPeriodicWave')
|
| + @DocsEditable()
|
| + @Experimental() // untriaged
|
| + PeriodicWave _createPeriodicWave_1(
|
| + Float32List real, Float32List imag, options) native;
|
| + @JSName('createPeriodicWave')
|
| + @DomName('AudioContext.createPeriodicWave')
|
| + @DocsEditable()
|
| + @Experimental() // untriaged
|
| + PeriodicWave _createPeriodicWave_2(Float32List real, Float32List imag) native;
|
| +
|
| + @DomName('AudioContext.createStereoPanner')
|
| + @DocsEditable()
|
| + @Experimental() // untriaged
|
| + StereoPannerNode createStereoPanner() native;
|
|
|
| @DomName('AudioContext.createWaveShaper')
|
| @DocsEditable()
|
| @@ -317,18 +364,19 @@ class AudioContext extends EventTarget {
|
| @JSName('decodeAudioData')
|
| @DomName('AudioContext.decodeAudioData')
|
| @DocsEditable()
|
| - void _decodeAudioData(
|
| - ByteBuffer audioData, AudioBufferCallback successCallback,
|
| - [AudioBufferCallback errorCallback]) native;
|
| + Future _decodeAudioData(ByteBuffer audioData,
|
| + [AudioBufferCallback successCallback,
|
| + AudioBufferCallback errorCallback]) native;
|
|
|
| - @DomName('AudioContext.startRendering')
|
| + @DomName('AudioContext.resume')
|
| @DocsEditable()
|
| - void startRendering() native;
|
| + @Experimental() // untriaged
|
| + Future resume() native;
|
|
|
| - /// Stream of `complete` events handled by this [AudioContext].
|
| - @DomName('AudioContext.oncomplete')
|
| + @DomName('AudioContext.suspend')
|
| @DocsEditable()
|
| - Stream<Event> get onComplete => completeEvent.forTarget(this);
|
| + @Experimental() // untriaged
|
| + Future suspend() native;
|
|
|
| factory AudioContext() => JS('AudioContext',
|
| 'new (window.AudioContext || window.webkitAudioContext)()');
|
| @@ -471,19 +519,21 @@ class AudioNode extends EventTarget {
|
| @JSName('connect')
|
| @DomName('AudioNode.connect')
|
| @DocsEditable()
|
| - void _connect(destination, int output, [int input]) native;
|
| + AudioNode _connect(destination, [int output, int input]) native;
|
|
|
| @DomName('AudioNode.disconnect')
|
| @DocsEditable()
|
| - void disconnect(int output) native;
|
| + void disconnect([destination_OR_output, int output, int input]) native;
|
|
|
| @DomName('AudioNode.connect')
|
| - void connectNode(AudioNode destination, [int output = 0, int input = 0]) =>
|
| - _connect(destination, output, input);
|
| + void connectNode(AudioNode destination, [int output = 0, int input = 0]) {
|
| + _connect(destination, output, input);
|
| + }
|
|
|
| @DomName('AudioNode.connect')
|
| - void connectParam(AudioParam destination, [int output = 0]) =>
|
| - _connect(destination, output);
|
| + void connectParam(AudioParam destination, [int output = 0]) {
|
| + _connect(destination, output);
|
| + }
|
| }
|
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| @@ -510,27 +560,28 @@ class AudioParam extends Interceptor {
|
|
|
| @DomName('AudioParam.cancelScheduledValues')
|
| @DocsEditable()
|
| - void cancelScheduledValues(num startTime) native;
|
| + AudioParam cancelScheduledValues(num startTime) native;
|
|
|
| @DomName('AudioParam.exponentialRampToValueAtTime')
|
| @DocsEditable()
|
| - void exponentialRampToValueAtTime(num value, num time) native;
|
| + AudioParam exponentialRampToValueAtTime(num value, num time) native;
|
|
|
| @DomName('AudioParam.linearRampToValueAtTime')
|
| @DocsEditable()
|
| - void linearRampToValueAtTime(num value, num time) native;
|
| + AudioParam linearRampToValueAtTime(num value, num time) native;
|
|
|
| @DomName('AudioParam.setTargetAtTime')
|
| @DocsEditable()
|
| - void setTargetAtTime(num target, num time, num timeConstant) native;
|
| + AudioParam setTargetAtTime(num target, num time, num timeConstant) native;
|
|
|
| @DomName('AudioParam.setValueAtTime')
|
| @DocsEditable()
|
| - void setValueAtTime(num value, num time) native;
|
| + AudioParam setValueAtTime(num value, num time) native;
|
|
|
| @DomName('AudioParam.setValueCurveAtTime')
|
| @DocsEditable()
|
| - void setValueCurveAtTime(Float32List values, num time, num duration) native;
|
| + AudioParam setValueCurveAtTime(Float32List values, num time, num duration)
|
| + native;
|
| }
|
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| @@ -750,6 +801,26 @@ class GainNode extends AudioNode {
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| @DocsEditable()
|
| +@DomName('IIRFilterNode')
|
| +@Experimental() // untriaged
|
| +@Native("IIRFilterNode")
|
| +class IirFilterNode extends AudioNode {
|
| + // To suppress missing implicit constructor warnings.
|
| + factory IirFilterNode._() {
|
| + throw new UnsupportedError("Not supported");
|
| + }
|
| +
|
| + @DomName('IIRFilterNode.getFrequencyResponse')
|
| + @DocsEditable()
|
| + @Experimental() // untriaged
|
| + void getFrequencyResponse(Float32List frequencyHz, Float32List magResponse,
|
| + Float32List phaseResponse) native;
|
| +}
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +@DocsEditable()
|
| @DomName('MediaElementAudioSourceNode')
|
| // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaElementAudioSourceNode
|
| @Experimental()
|
| @@ -848,6 +919,17 @@ class OfflineAudioContext extends AudioContext {
|
| numberOfChannels, numberOfFrames, sampleRate) =>
|
| JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)',
|
| numberOfChannels, numberOfFrames, sampleRate);
|
| +
|
| + @DomName('OfflineAudioContext.startRendering')
|
| + @DocsEditable()
|
| + @Experimental() // untriaged
|
| + Future startRendering() native;
|
| +
|
| + @JSName('suspend')
|
| + @DomName('OfflineAudioContext.suspend')
|
| + @DocsEditable()
|
| + @Experimental() // untriaged
|
| + Future suspendFor(num suspendTime) native;
|
| }
|
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| @@ -888,14 +970,6 @@ class OscillatorNode extends AudioSourceNode {
|
| @DocsEditable()
|
| String type;
|
|
|
| - @DomName('OscillatorNode.noteOff')
|
| - @DocsEditable()
|
| - void noteOff(num when) native;
|
| -
|
| - @DomName('OscillatorNode.noteOn')
|
| - @DocsEditable()
|
| - void noteOn(num when) native;
|
| -
|
| @DomName('OscillatorNode.setPeriodicWave')
|
| @DocsEditable()
|
| @Experimental() // untriaged
|
| @@ -1043,6 +1117,25 @@ class ScriptProcessorNode extends AudioNode {
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| @DocsEditable()
|
| +@DomName('StereoPannerNode')
|
| +@Experimental() // untriaged
|
| +@Native("StereoPannerNode")
|
| +class StereoPannerNode extends AudioNode {
|
| + // To suppress missing implicit constructor warnings.
|
| + factory StereoPannerNode._() {
|
| + throw new UnsupportedError("Not supported");
|
| + }
|
| +
|
| + @DomName('StereoPannerNode.pan')
|
| + @DocsEditable()
|
| + @Experimental() // untriaged
|
| + final AudioParam pan;
|
| +}
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +@DocsEditable()
|
| @DomName('WaveShaperNode')
|
| // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-WaveShaperNode
|
| @Experimental()
|
|
|