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

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

Issue 898973002: Re-gen SDK files and enable audio test onAudioProcess exists again (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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/html/dartium/html_dartium.dart ('k') | sdk/lib/web_audio/dartium/web_audio_dartium.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 9a47ceb682b69adfca513d1d9b57fce87780b3c2..9524b8067b9ed84afa713151146c5ac28e8bf7a9 100644
--- a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
+++ b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
@@ -961,6 +961,17 @@ class ScriptProcessorNode extends AudioNode {
// To suppress missing implicit constructor warnings.
factory ScriptProcessorNode._() { throw new UnsupportedError("Not supported"); }
+ /**
+ * Static factory designed to expose `audioprocess` events to event
+ * handlers that are not necessarily instances of [ScriptProcessorNode].
+ *
+ * See [EventStreamProvider] for usage information.
+ */
+ @DomName('ScriptProcessorNode.audioprocessEvent')
+ @DocsEditable()
+ @Experimental() // untriaged
+ static const EventStreamProvider<AudioProcessingEvent> audioProcessEvent = const EventStreamProvider<AudioProcessingEvent>('audioprocess');
+
@DomName('ScriptProcessorNode.bufferSize')
@DocsEditable()
final int bufferSize;
@@ -969,6 +980,19 @@ class ScriptProcessorNode extends AudioNode {
@DocsEditable()
@Experimental() // untriaged
void setEventListener(EventListener eventListener) native;
+
+ /// Stream of `audioprocess` events handled by this [ScriptProcessorNode].
+/**
+ * Get a Stream that fires events when AudioProcessingEvents occur.
+ * This particular stream is special in that it only allows one listener to a
+ * given stream. Converting the returned Stream [asBroadcast] will likely ruin
+ * the soft-real-time properties which which these events are fired and can
+ * be processed.
+ */
+ @DomName('ScriptProcessorNode.onaudioprocess')
+ @DocsEditable()
+ @Experimental() // untriaged
+ Stream<AudioProcessingEvent> get onAudioProcess => audioProcessEvent.forTarget(this);
}
// 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
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/web_audio/dartium/web_audio_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698