| OLD | NEW |
| 1 /** | 1 /** |
| 2 * High-fidelity audio programming in the browser. | 2 * High-fidelity audio programming in the browser. |
| 3 */ | 3 */ |
| 4 library dart.dom.web_audio; | 4 library dart.dom.web_audio; |
| 5 | 5 |
| 6 import 'dart:async'; | 6 import 'dart:async'; |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:_internal' hide deprecated; | 8 import 'dart:_internal' hide deprecated; |
| 9 import 'dart:html'; | 9 import 'dart:html'; |
| 10 import 'dart:html_common'; | 10 import 'dart:html_common'; |
| (...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 | 954 |
| 955 @DocsEditable() | 955 @DocsEditable() |
| 956 @DomName('ScriptProcessorNode') | 956 @DomName('ScriptProcessorNode') |
| 957 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ScriptP
rocessorNode | 957 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ScriptP
rocessorNode |
| 958 @Experimental() | 958 @Experimental() |
| 959 @Native("ScriptProcessorNode,JavaScriptAudioNode") | 959 @Native("ScriptProcessorNode,JavaScriptAudioNode") |
| 960 class ScriptProcessorNode extends AudioNode { | 960 class ScriptProcessorNode extends AudioNode { |
| 961 // To suppress missing implicit constructor warnings. | 961 // To suppress missing implicit constructor warnings. |
| 962 factory ScriptProcessorNode._() { throw new UnsupportedError("Not supported");
} | 962 factory ScriptProcessorNode._() { throw new UnsupportedError("Not supported");
} |
| 963 | 963 |
| 964 /** |
| 965 * Static factory designed to expose `audioprocess` events to event |
| 966 * handlers that are not necessarily instances of [ScriptProcessorNode]. |
| 967 * |
| 968 * See [EventStreamProvider] for usage information. |
| 969 */ |
| 970 @DomName('ScriptProcessorNode.audioprocessEvent') |
| 971 @DocsEditable() |
| 972 @Experimental() // untriaged |
| 973 static const EventStreamProvider<AudioProcessingEvent> audioProcessEvent = con
st EventStreamProvider<AudioProcessingEvent>('audioprocess'); |
| 974 |
| 964 @DomName('ScriptProcessorNode.bufferSize') | 975 @DomName('ScriptProcessorNode.bufferSize') |
| 965 @DocsEditable() | 976 @DocsEditable() |
| 966 final int bufferSize; | 977 final int bufferSize; |
| 967 | 978 |
| 968 @DomName('ScriptProcessorNode.setEventListener') | 979 @DomName('ScriptProcessorNode.setEventListener') |
| 969 @DocsEditable() | 980 @DocsEditable() |
| 970 @Experimental() // untriaged | 981 @Experimental() // untriaged |
| 971 void setEventListener(EventListener eventListener) native; | 982 void setEventListener(EventListener eventListener) native; |
| 983 |
| 984 /// Stream of `audioprocess` events handled by this [ScriptProcessorNode]. |
| 985 /** |
| 986 * Get a Stream that fires events when AudioProcessingEvents occur. |
| 987 * This particular stream is special in that it only allows one listener to a |
| 988 * given stream. Converting the returned Stream [asBroadcast] will likely ruin |
| 989 * the soft-real-time properties which which these events are fired and can |
| 990 * be processed. |
| 991 */ |
| 992 @DomName('ScriptProcessorNode.onaudioprocess') |
| 993 @DocsEditable() |
| 994 @Experimental() // untriaged |
| 995 Stream<AudioProcessingEvent> get onAudioProcess => audioProcessEvent.forTarget
(this); |
| 972 } | 996 } |
| 973 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 997 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 974 // for details. All rights reserved. Use of this source code is governed by a | 998 // for details. All rights reserved. Use of this source code is governed by a |
| 975 // BSD-style license that can be found in the LICENSE file. | 999 // BSD-style license that can be found in the LICENSE file. |
| 976 | 1000 |
| 977 | 1001 |
| 978 @DocsEditable() | 1002 @DocsEditable() |
| 979 @DomName('WaveShaperNode') | 1003 @DomName('WaveShaperNode') |
| 980 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Wav
eShaperNode | 1004 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Wav
eShaperNode |
| 981 @Experimental() | 1005 @Experimental() |
| 982 @Native("WaveShaperNode") | 1006 @Native("WaveShaperNode") |
| 983 class WaveShaperNode extends AudioNode { | 1007 class WaveShaperNode extends AudioNode { |
| 984 // To suppress missing implicit constructor warnings. | 1008 // To suppress missing implicit constructor warnings. |
| 985 factory WaveShaperNode._() { throw new UnsupportedError("Not supported"); } | 1009 factory WaveShaperNode._() { throw new UnsupportedError("Not supported"); } |
| 986 | 1010 |
| 987 @DomName('WaveShaperNode.curve') | 1011 @DomName('WaveShaperNode.curve') |
| 988 @DocsEditable() | 1012 @DocsEditable() |
| 989 Float32List curve; | 1013 Float32List curve; |
| 990 | 1014 |
| 991 @DomName('WaveShaperNode.oversample') | 1015 @DomName('WaveShaperNode.oversample') |
| 992 @DocsEditable() | 1016 @DocsEditable() |
| 993 String oversample; | 1017 String oversample; |
| 994 } | 1018 } |
| OLD | NEW |