Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1101)

Unified Diff: sdk/lib/web_audio/dart2js/web_audio_dart2js.dart

Issue 1762063002: Basline of dart2js w/ regen'd sdk/libs (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/svg/dart2js/svg_dart2js.dart ('k') | sdk/lib/web_gl/dart2js/web_gl_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6005329d47690b9a851c5afb91f22b4737b1cc80..2a7e6640a685bbabdb216b6802fcfb96f786e7f7 100644
--- a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
+++ b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
@@ -101,6 +101,16 @@ 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;
@@ -176,6 +186,11 @@ class AudioBufferSourceNode extends AudioSourceNode {
@DocsEditable()
AudioBuffer buffer;
+ @DomName('AudioBufferSourceNode.detune')
+ @DocsEditable()
+ @Experimental() // untriaged
+ final AudioParam detune;
+
@DomName('AudioBufferSourceNode.loop')
@DocsEditable()
bool loop;
@@ -214,16 +229,6 @@ 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)');
@@ -243,6 +248,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;
@@ -304,6 +319,11 @@ 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;
@@ -313,14 +333,15 @@ class AudioContext extends EventTarget {
@DocsEditable()
void _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)()');
@@ -455,11 +476,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(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]) =>
@@ -811,6 +832,11 @@ 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
@@ -849,14 +875,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
@@ -1000,6 +1018,24 @@ 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()
« no previous file with comments | « sdk/lib/svg/dart2js/svg_dart2js.dart ('k') | sdk/lib/web_gl/dart2js/web_gl_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698