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 2a7e6640a685bbabdb216b6802fcfb96f786e7f7..6005329d47690b9a851c5afb91f22b4737b1cc80 100644 |
--- a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart |
+++ b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart |
@@ -101,16 +101,6 @@ 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; |
@@ -186,11 +176,6 @@ class AudioBufferSourceNode extends AudioSourceNode { |
@DocsEditable() |
AudioBuffer buffer; |
- @DomName('AudioBufferSourceNode.detune') |
- @DocsEditable() |
- @Experimental() // untriaged |
- final AudioParam detune; |
- |
@DomName('AudioBufferSourceNode.loop') |
@DocsEditable() |
bool loop; |
@@ -229,6 +214,16 @@ class AudioContext extends EventTarget { |
// To suppress missing implicit constructor warnings. |
factory AudioContext._() { 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)'); |
@@ -248,16 +243,6 @@ 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; |
@@ -319,11 +304,6 @@ class AudioContext extends EventTarget { |
@Experimental() // untriaged |
PeriodicWave createPeriodicWave(Float32List real, Float32List imag) native; |
- @DomName('AudioContext.createStereoPanner') |
- @DocsEditable() |
- @Experimental() // untriaged |
- StereoPannerNode createStereoPanner() native; |
- |
@DomName('AudioContext.createWaveShaper') |
@DocsEditable() |
WaveShaperNode createWaveShaper() native; |
@@ -333,15 +313,14 @@ class AudioContext extends EventTarget { |
@DocsEditable() |
void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallback, [AudioBufferCallback errorCallback]) native; |
- @DomName('AudioContext.resume') |
+ @DomName('AudioContext.startRendering') |
@DocsEditable() |
- @Experimental() // untriaged |
- Future resume() native; |
+ void startRendering() native; |
- @DomName('AudioContext.suspend') |
+ /// Stream of `complete` events handled by this [AudioContext]. |
+ @DomName('AudioContext.oncomplete') |
@DocsEditable() |
- @Experimental() // untriaged |
- Future suspend() native; |
+ Stream<Event> get onComplete => completeEvent.forTarget(this); |
factory AudioContext() => JS('AudioContext', |
'new (window.AudioContext || window.webkitAudioContext)()'); |
@@ -476,11 +455,11 @@ class AudioNode extends EventTarget { |
@JSName('connect') |
@DomName('AudioNode.connect') |
@DocsEditable() |
- void _connect(destination, [int output, int input]) native; |
+ void _connect(destination, int output, [int input]) native; |
@DomName('AudioNode.disconnect') |
@DocsEditable() |
- void disconnect([destination_OR_output, int output, int input]) native; |
+ void disconnect(int output) native; |
@DomName('AudioNode.connect') |
void connectNode(AudioNode destination, [int output = 0, int input = 0]) => |
@@ -832,11 +811,6 @@ class OfflineAudioContext extends AudioContext { |
return OfflineAudioContext._create_1(numberOfChannels, numberOfFrames, sampleRate); |
} |
static OfflineAudioContext _create_1(numberOfChannels, numberOfFrames, sampleRate) => JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)', numberOfChannels, numberOfFrames, sampleRate); |
- |
- @DomName('OfflineAudioContext.startRendering') |
- @DocsEditable() |
- @Experimental() // untriaged |
- Future startRendering() 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 |
@@ -875,6 +849,14 @@ 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 |
@@ -1018,24 +1000,6 @@ class ScriptProcessorNode extends AudioNode { |
@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() |