| 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
|
|
|