Index: sdk/lib/web_audio/dart2js/web_audio_dart2js.dart |
diff --git a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart |
index 2c7e3cea756c9ec0c3421cf2dd2083193b284196..3f09df66cc526bbf5731872b5d01dcb4258bba01 100644 |
--- a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart |
+++ b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart |
@@ -126,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. |
@@ -299,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( |
@@ -324,7 +331,26 @@ 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() |
@@ -338,9 +364,9 @@ 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.resume') |
@DocsEditable() |
@@ -493,7 +519,7 @@ 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() |
@@ -534,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 |
@@ -773,6 +800,26 @@ class GainNode extends AudioNode { |
// 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('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 |
@@ -877,6 +924,11 @@ class OfflineAudioContext extends AudioContext { |
@DocsEditable() |
@Experimental() // untriaged |
Future startRendering() native; |
+ |
+ @DomName('OfflineAudioContext.suspend') |
+ @DocsEditable() |
+ @Experimental() // untriaged |
+ Future suspend(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 |