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

Side by Side Diff: pkg/dev_compiler/tool/input_sdk/lib/web_audio/dart2js/web_audio_dart2js.dart

Issue 2752163002: Format all dart dev compiler files (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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'; 8 import 'dart:_internal';
9 import 'dart:html'; 9 import 'dart:html';
10 import 'dart:html_common'; 10 import 'dart:html_common';
11 import 'dart:_native_typed_data'; 11 import 'dart:_native_typed_data';
12 import 'dart:typed_data'; 12 import 'dart:typed_data';
13 import 'dart:_js_helper' show Creates, JSName, Native, Returns, convertDartClosu reToJS; 13 import 'dart:_js_helper'
14 show Creates, JSName, Native, Returns, convertDartClosureToJS;
14 import 'dart:_foreign_helper' show JS; 15 import 'dart:_foreign_helper' show JS;
15 import 'dart:_interceptors' show Interceptor; 16 import 'dart:_interceptors' show Interceptor;
16 // DO NOT EDIT - unless you are editing documentation as per: 17 // DO NOT EDIT - unless you are editing documentation as per:
17 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation 18 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation
18 // Auto-generated dart:audio library. 19 // Auto-generated dart:audio library.
19 20
20
21
22
23 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 21 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
24 // for details. All rights reserved. Use of this source code is governed by a 22 // for details. All rights reserved. Use of this source code is governed by a
25 // BSD-style license that can be found in the LICENSE file. 23 // BSD-style license that can be found in the LICENSE file.
26 24
27
28 @DocsEditable() 25 @DocsEditable()
29 @DomName('AnalyserNode') 26 @DomName('AnalyserNode')
30 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Analyse rNode 27 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Analyse rNode
31 @Experimental() 28 @Experimental()
32 @Native("AnalyserNode,RealtimeAnalyserNode") 29 @Native("AnalyserNode,RealtimeAnalyserNode")
33 class AnalyserNode extends AudioNode { 30 class AnalyserNode extends AudioNode {
34 // To suppress missing implicit constructor warnings. 31 // To suppress missing implicit constructor warnings.
35 factory AnalyserNode._() { throw new UnsupportedError("Not supported"); } 32 factory AnalyserNode._() {
33 throw new UnsupportedError("Not supported");
34 }
36 35
37 @DomName('AnalyserNode.fftSize') 36 @DomName('AnalyserNode.fftSize')
38 @DocsEditable() 37 @DocsEditable()
39 int fftSize; 38 int fftSize;
40 39
41 @DomName('AnalyserNode.frequencyBinCount') 40 @DomName('AnalyserNode.frequencyBinCount')
42 @DocsEditable() 41 @DocsEditable()
43 final int frequencyBinCount; 42 final int frequencyBinCount;
44 43
45 @DomName('AnalyserNode.maxDecibels') 44 @DomName('AnalyserNode.maxDecibels')
46 @DocsEditable() 45 @DocsEditable()
47 num maxDecibels; 46 num maxDecibels;
48 47
49 @DomName('AnalyserNode.minDecibels') 48 @DomName('AnalyserNode.minDecibels')
50 @DocsEditable() 49 @DocsEditable()
51 num minDecibels; 50 num minDecibels;
52 51
53 @DomName('AnalyserNode.smoothingTimeConstant') 52 @DomName('AnalyserNode.smoothingTimeConstant')
54 @DocsEditable() 53 @DocsEditable()
55 num smoothingTimeConstant; 54 num smoothingTimeConstant;
56 55
57 @DomName('AnalyserNode.getByteFrequencyData') 56 @DomName('AnalyserNode.getByteFrequencyData')
58 @DocsEditable() 57 @DocsEditable()
59 void getByteFrequencyData(Uint8List array) native; 58 void getByteFrequencyData(Uint8List array) native ;
60 59
61 @DomName('AnalyserNode.getByteTimeDomainData') 60 @DomName('AnalyserNode.getByteTimeDomainData')
62 @DocsEditable() 61 @DocsEditable()
63 void getByteTimeDomainData(Uint8List array) native; 62 void getByteTimeDomainData(Uint8List array) native ;
64 63
65 @DomName('AnalyserNode.getFloatFrequencyData') 64 @DomName('AnalyserNode.getFloatFrequencyData')
66 @DocsEditable() 65 @DocsEditable()
67 void getFloatFrequencyData(Float32List array) native; 66 void getFloatFrequencyData(Float32List array) native ;
68 67
69 @DomName('AnalyserNode.getFloatTimeDomainData') 68 @DomName('AnalyserNode.getFloatTimeDomainData')
70 @DocsEditable() 69 @DocsEditable()
71 @Experimental() // untriaged 70 @Experimental() // untriaged
72 void getFloatTimeDomainData(Float32List array) native; 71 void getFloatTimeDomainData(Float32List array) native ;
73 } 72 }
74 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 73 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
75 // for details. All rights reserved. Use of this source code is governed by a 74 // for details. All rights reserved. Use of this source code is governed by a
76 // BSD-style license that can be found in the LICENSE file. 75 // BSD-style license that can be found in the LICENSE file.
77 76
78
79 @DocsEditable() 77 @DocsEditable()
80 @DomName('AudioBuffer') 78 @DomName('AudioBuffer')
81 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu ffer-section 79 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu ffer-section
82 @Experimental() 80 @Experimental()
83 @Native("AudioBuffer") 81 @Native("AudioBuffer")
84 class AudioBuffer extends Interceptor { 82 class AudioBuffer extends Interceptor {
85 // To suppress missing implicit constructor warnings. 83 // To suppress missing implicit constructor warnings.
86 factory AudioBuffer._() { throw new UnsupportedError("Not supported"); } 84 factory AudioBuffer._() {
85 throw new UnsupportedError("Not supported");
86 }
87 87
88 @DomName('AudioBuffer.duration') 88 @DomName('AudioBuffer.duration')
89 @DocsEditable() 89 @DocsEditable()
90 final double duration; 90 final double duration;
91 91
92 @DomName('AudioBuffer.length') 92 @DomName('AudioBuffer.length')
93 @DocsEditable() 93 @DocsEditable()
94 final int length; 94 final int length;
95 95
96 @DomName('AudioBuffer.numberOfChannels') 96 @DomName('AudioBuffer.numberOfChannels')
97 @DocsEditable() 97 @DocsEditable()
98 final int numberOfChannels; 98 final int numberOfChannels;
99 99
100 @DomName('AudioBuffer.sampleRate') 100 @DomName('AudioBuffer.sampleRate')
101 @DocsEditable() 101 @DocsEditable()
102 final double sampleRate; 102 final double sampleRate;
103 103
104 @DomName('AudioBuffer.getChannelData') 104 @DomName('AudioBuffer.getChannelData')
105 @DocsEditable() 105 @DocsEditable()
106 Float32List getChannelData(int channelIndex) native; 106 Float32List getChannelData(int channelIndex) native ;
107 } 107 }
108 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 108 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
109 // for details. All rights reserved. Use of this source code is governed by a 109 // for details. All rights reserved. Use of this source code is governed by a
110 // BSD-style license that can be found in the LICENSE file. 110 // BSD-style license that can be found in the LICENSE file.
111 111
112 // WARNING: Do not edit - generated code. 112 // WARNING: Do not edit - generated code.
113 113
114
115 @DomName('AudioBufferCallback') 114 @DomName('AudioBufferCallback')
116 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu ffer-section 115 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu ffer-section
117 @Experimental() 116 @Experimental()
118 typedef void AudioBufferCallback(AudioBuffer audioBuffer); 117 typedef void AudioBufferCallback(AudioBuffer audioBuffer);
119 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 118 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
120 // for details. All rights reserved. Use of this source code is governed by a 119 // for details. All rights reserved. Use of this source code is governed by a
121 // BSD-style license that can be found in the LICENSE file. 120 // BSD-style license that can be found in the LICENSE file.
122 121
123
124 @DomName('AudioBufferSourceNode') 122 @DomName('AudioBufferSourceNode')
125 @SupportedBrowser(SupportedBrowser.CHROME) 123 @SupportedBrowser(SupportedBrowser.CHROME)
126 @SupportedBrowser(SupportedBrowser.FIREFOX) 124 @SupportedBrowser(SupportedBrowser.FIREFOX)
127 @Experimental() 125 @Experimental()
128 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu fferSourceNode-section 126 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu fferSourceNode-section
129 @Native("AudioBufferSourceNode") 127 @Native("AudioBufferSourceNode")
130 class AudioBufferSourceNode extends AudioSourceNode { 128 class AudioBufferSourceNode extends AudioSourceNode {
131
132 // TODO(efortuna): Remove these methods when Chrome stable also uses start 129 // TODO(efortuna): Remove these methods when Chrome stable also uses start
133 // instead of noteOn. 130 // instead of noteOn.
134 void start(num when, [num grainOffset, num grainDuration]) { 131 void start(num when, [num grainOffset, num grainDuration]) {
135 if (JS('bool', '!!#.start', this)) { 132 if (JS('bool', '!!#.start', this)) {
136 if (grainDuration != null) { 133 if (grainDuration != null) {
137 JS('void', '#.start(#, #, #)', this, when, grainOffset, grainDuration); 134 JS('void', '#.start(#, #, #)', this, when, grainOffset, grainDuration);
138 } else if (grainOffset != null) { 135 } else if (grainOffset != null) {
139 JS('void', '#.start(#, #)', this, when, grainOffset); 136 JS('void', '#.start(#, #)', this, when, grainOffset);
140 } else { 137 } else {
141 JS('void', '#.start(#)', this, when); 138 JS('void', '#.start(#)', this, when);
142 } 139 }
143 } else { 140 } else {
144 if (grainDuration != null) { 141 if (grainDuration != null) {
145 JS('void', '#.noteOn(#, #, #)', this, when, grainOffset, grainDuration); 142 JS('void', '#.noteOn(#, #, #)', this, when, grainOffset, grainDuration);
146 } else if (grainOffset != null) { 143 } else if (grainOffset != null) {
147 JS('void', '#.noteOn(#, #)', this, when, grainOffset); 144 JS('void', '#.noteOn(#, #)', this, when, grainOffset);
148 } else { 145 } else {
149 JS('void', '#.noteOn(#)', this, when); 146 JS('void', '#.noteOn(#)', this, when);
150 } 147 }
151 } 148 }
152 } 149 }
153 150
154 void stop(num when) { 151 void stop(num when) {
155 if (JS('bool', '!!#.stop', this)) { 152 if (JS('bool', '!!#.stop', this)) {
156 JS('void', '#.stop(#)', this, when); 153 JS('void', '#.stop(#)', this, when);
157 } else { 154 } else {
158 JS('void', '#.noteOff(#)', this, when); 155 JS('void', '#.noteOff(#)', this, when);
159 } 156 }
160 } 157 }
158
161 // To suppress missing implicit constructor warnings. 159 // To suppress missing implicit constructor warnings.
162 factory AudioBufferSourceNode._() { throw new UnsupportedError("Not supported" ); } 160 factory AudioBufferSourceNode._() {
161 throw new UnsupportedError("Not supported");
162 }
163 163
164 /** 164 /**
165 * Static factory designed to expose `ended` events to event 165 * Static factory designed to expose `ended` events to event
166 * handlers that are not necessarily instances of [AudioBufferSourceNode]. 166 * handlers that are not necessarily instances of [AudioBufferSourceNode].
167 * 167 *
168 * See [EventStreamProvider] for usage information. 168 * See [EventStreamProvider] for usage information.
169 */ 169 */
170 @DomName('AudioBufferSourceNode.endedEvent') 170 @DomName('AudioBufferSourceNode.endedEvent')
171 @DocsEditable() 171 @DocsEditable()
172 @Experimental() // untriaged 172 @Experimental() // untriaged
173 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider <Event>('ended'); 173 static const EventStreamProvider<Event> endedEvent =
174 const EventStreamProvider<Event>('ended');
174 175
175 @DomName('AudioBufferSourceNode.buffer') 176 @DomName('AudioBufferSourceNode.buffer')
176 @DocsEditable() 177 @DocsEditable()
177 AudioBuffer buffer; 178 AudioBuffer buffer;
178 179
179 @DomName('AudioBufferSourceNode.loop') 180 @DomName('AudioBufferSourceNode.loop')
180 @DocsEditable() 181 @DocsEditable()
181 bool loop; 182 bool loop;
182 183
183 @DomName('AudioBufferSourceNode.loopEnd') 184 @DomName('AudioBufferSourceNode.loopEnd')
184 @DocsEditable() 185 @DocsEditable()
185 num loopEnd; 186 num loopEnd;
186 187
187 @DomName('AudioBufferSourceNode.loopStart') 188 @DomName('AudioBufferSourceNode.loopStart')
188 @DocsEditable() 189 @DocsEditable()
189 num loopStart; 190 num loopStart;
190 191
191 @DomName('AudioBufferSourceNode.playbackRate') 192 @DomName('AudioBufferSourceNode.playbackRate')
192 @DocsEditable() 193 @DocsEditable()
193 final AudioParam playbackRate; 194 final AudioParam playbackRate;
194 195
195 /// Stream of `ended` events handled by this [AudioBufferSourceNode]. 196 /// Stream of `ended` events handled by this [AudioBufferSourceNode].
196 @DomName('AudioBufferSourceNode.onended') 197 @DomName('AudioBufferSourceNode.onended')
197 @DocsEditable() 198 @DocsEditable()
198 @Experimental() // untriaged 199 @Experimental() // untriaged
199 Stream<Event> get onEnded => endedEvent.forTarget(this); 200 Stream<Event> get onEnded => endedEvent.forTarget(this);
200
201 } 201 }
202 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 202 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
203 // for details. All rights reserved. Use of this source code is governed by a 203 // for details. All rights reserved. Use of this source code is governed by a
204 // BSD-style license that can be found in the LICENSE file. 204 // BSD-style license that can be found in the LICENSE file.
205 205
206
207 @DomName('AudioContext') 206 @DomName('AudioContext')
208 @SupportedBrowser(SupportedBrowser.CHROME) 207 @SupportedBrowser(SupportedBrowser.CHROME)
209 @SupportedBrowser(SupportedBrowser.FIREFOX) 208 @SupportedBrowser(SupportedBrowser.FIREFOX)
210 @Experimental() 209 @Experimental()
211 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioCo ntext-section 210 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioCo ntext-section
212 @Native("AudioContext,webkitAudioContext") 211 @Native("AudioContext,webkitAudioContext")
213 class AudioContext extends EventTarget { 212 class AudioContext extends EventTarget {
214 // To suppress missing implicit constructor warnings. 213 // To suppress missing implicit constructor warnings.
215 factory AudioContext._() { throw new UnsupportedError("Not supported"); } 214 factory AudioContext._() {
215 throw new UnsupportedError("Not supported");
216 }
216 217
217 /** 218 /**
218 * Static factory designed to expose `complete` events to event 219 * Static factory designed to expose `complete` events to event
219 * handlers that are not necessarily instances of [AudioContext]. 220 * handlers that are not necessarily instances of [AudioContext].
220 * 221 *
221 * See [EventStreamProvider] for usage information. 222 * See [EventStreamProvider] for usage information.
222 */ 223 */
223 @DomName('AudioContext.completeEvent') 224 @DomName('AudioContext.completeEvent')
224 @DocsEditable() 225 @DocsEditable()
225 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi der<Event>('complete'); 226 static const EventStreamProvider<Event> completeEvent =
227 const EventStreamProvider<Event>('complete');
226 228
227 /// Checks if this type is supported on the current platform. 229 /// Checks if this type is supported on the current platform.
228 static bool get supported => JS('bool', '!!(window.AudioContext || window.webk itAudioContext)'); 230 static bool get supported =>
231 JS('bool', '!!(window.AudioContext || window.webkitAudioContext)');
229 232
230 @DomName('AudioContext.currentTime') 233 @DomName('AudioContext.currentTime')
231 @DocsEditable() 234 @DocsEditable()
232 final double currentTime; 235 final double currentTime;
233 236
234 @DomName('AudioContext.destination') 237 @DomName('AudioContext.destination')
235 @DocsEditable() 238 @DocsEditable()
236 final AudioDestinationNode destination; 239 final AudioDestinationNode destination;
237 240
238 @DomName('AudioContext.listener') 241 @DomName('AudioContext.listener')
239 @DocsEditable() 242 @DocsEditable()
240 final AudioListener listener; 243 final AudioListener listener;
241 244
242 @DomName('AudioContext.sampleRate') 245 @DomName('AudioContext.sampleRate')
243 @DocsEditable() 246 @DocsEditable()
244 final double sampleRate; 247 final double sampleRate;
245 248
246 @DomName('AudioContext.createAnalyser') 249 @DomName('AudioContext.createAnalyser')
247 @DocsEditable() 250 @DocsEditable()
248 AnalyserNode createAnalyser() native; 251 AnalyserNode createAnalyser() native ;
249 252
250 @DomName('AudioContext.createBiquadFilter') 253 @DomName('AudioContext.createBiquadFilter')
251 @DocsEditable() 254 @DocsEditable()
252 BiquadFilterNode createBiquadFilter() native; 255 BiquadFilterNode createBiquadFilter() native ;
253 256
254 @DomName('AudioContext.createBuffer') 257 @DomName('AudioContext.createBuffer')
255 @DocsEditable() 258 @DocsEditable()
256 AudioBuffer createBuffer(int numberOfChannels, int numberOfFrames, num sampleR ate) native; 259 AudioBuffer createBuffer(
260 int numberOfChannels, int numberOfFrames, num sampleRate) native ;
257 261
258 @DomName('AudioContext.createBufferSource') 262 @DomName('AudioContext.createBufferSource')
259 @DocsEditable() 263 @DocsEditable()
260 AudioBufferSourceNode createBufferSource() native; 264 AudioBufferSourceNode createBufferSource() native ;
261 265
262 @DomName('AudioContext.createChannelMerger') 266 @DomName('AudioContext.createChannelMerger')
263 @DocsEditable() 267 @DocsEditable()
264 ChannelMergerNode createChannelMerger([int numberOfInputs]) native; 268 ChannelMergerNode createChannelMerger([int numberOfInputs]) native ;
265 269
266 @DomName('AudioContext.createChannelSplitter') 270 @DomName('AudioContext.createChannelSplitter')
267 @DocsEditable() 271 @DocsEditable()
268 ChannelSplitterNode createChannelSplitter([int numberOfOutputs]) native; 272 ChannelSplitterNode createChannelSplitter([int numberOfOutputs]) native ;
269 273
270 @DomName('AudioContext.createConvolver') 274 @DomName('AudioContext.createConvolver')
271 @DocsEditable() 275 @DocsEditable()
272 ConvolverNode createConvolver() native; 276 ConvolverNode createConvolver() native ;
273 277
274 @DomName('AudioContext.createDelay') 278 @DomName('AudioContext.createDelay')
275 @DocsEditable() 279 @DocsEditable()
276 DelayNode createDelay([num maxDelayTime]) native; 280 DelayNode createDelay([num maxDelayTime]) native ;
277 281
278 @DomName('AudioContext.createDynamicsCompressor') 282 @DomName('AudioContext.createDynamicsCompressor')
279 @DocsEditable() 283 @DocsEditable()
280 DynamicsCompressorNode createDynamicsCompressor() native; 284 DynamicsCompressorNode createDynamicsCompressor() native ;
281 285
282 @DomName('AudioContext.createMediaElementSource') 286 @DomName('AudioContext.createMediaElementSource')
283 @DocsEditable() 287 @DocsEditable()
284 MediaElementAudioSourceNode createMediaElementSource(MediaElement mediaElement ) native; 288 MediaElementAudioSourceNode createMediaElementSource(
289 MediaElement mediaElement) native ;
285 290
286 @DomName('AudioContext.createMediaStreamDestination') 291 @DomName('AudioContext.createMediaStreamDestination')
287 @DocsEditable() 292 @DocsEditable()
288 MediaStreamAudioDestinationNode createMediaStreamDestination() native; 293 MediaStreamAudioDestinationNode createMediaStreamDestination() native ;
289 294
290 @DomName('AudioContext.createMediaStreamSource') 295 @DomName('AudioContext.createMediaStreamSource')
291 @DocsEditable() 296 @DocsEditable()
292 MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream) na tive; 297 MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream)
298 native ;
293 299
294 @DomName('AudioContext.createOscillator') 300 @DomName('AudioContext.createOscillator')
295 @DocsEditable() 301 @DocsEditable()
296 OscillatorNode createOscillator() native; 302 OscillatorNode createOscillator() native ;
297 303
298 @DomName('AudioContext.createPanner') 304 @DomName('AudioContext.createPanner')
299 @DocsEditable() 305 @DocsEditable()
300 PannerNode createPanner() native; 306 PannerNode createPanner() native ;
301 307
302 @DomName('AudioContext.createPeriodicWave') 308 @DomName('AudioContext.createPeriodicWave')
303 @DocsEditable() 309 @DocsEditable()
304 @Experimental() // untriaged 310 @Experimental() // untriaged
305 PeriodicWave createPeriodicWave(Float32List real, Float32List imag) native; 311 PeriodicWave createPeriodicWave(Float32List real, Float32List imag) native ;
306 312
307 @DomName('AudioContext.createWaveShaper') 313 @DomName('AudioContext.createWaveShaper')
308 @DocsEditable() 314 @DocsEditable()
309 WaveShaperNode createWaveShaper() native; 315 WaveShaperNode createWaveShaper() native ;
310 316
311 @JSName('decodeAudioData') 317 @JSName('decodeAudioData')
312 @DomName('AudioContext.decodeAudioData') 318 @DomName('AudioContext.decodeAudioData')
313 @DocsEditable() 319 @DocsEditable()
314 void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallbac k, [AudioBufferCallback errorCallback]) native; 320 void _decodeAudioData(
321 ByteBuffer audioData, AudioBufferCallback successCallback,
322 [AudioBufferCallback errorCallback]) native ;
315 323
316 @DomName('AudioContext.startRendering') 324 @DomName('AudioContext.startRendering')
317 @DocsEditable() 325 @DocsEditable()
318 void startRendering() native; 326 void startRendering() native ;
319 327
320 /// Stream of `complete` events handled by this [AudioContext]. 328 /// Stream of `complete` events handled by this [AudioContext].
321 @DomName('AudioContext.oncomplete') 329 @DomName('AudioContext.oncomplete')
322 @DocsEditable() 330 @DocsEditable()
323 Stream<Event> get onComplete => completeEvent.forTarget(this); 331 Stream<Event> get onComplete => completeEvent.forTarget(this);
324 332
325 factory AudioContext() => JS('AudioContext', 333 factory AudioContext() => JS('AudioContext',
326 'new (window.AudioContext || window.webkitAudioContext)()'); 334 'new (window.AudioContext || window.webkitAudioContext)()');
327 335
328 GainNode createGain() { 336 GainNode createGain() {
329 if (JS('bool', '#.createGain !== undefined', this)) { 337 if (JS('bool', '#.createGain !== undefined', this)) {
330 return JS('GainNode', '#.createGain()', this); 338 return JS('GainNode', '#.createGain()', this);
331 } else { 339 } else {
332 return JS('GainNode', '#.createGainNode()', this); 340 return JS('GainNode', '#.createGainNode()', this);
333 } 341 }
334 } 342 }
335 343
336 ScriptProcessorNode createScriptProcessor(int bufferSize, 344 ScriptProcessorNode createScriptProcessor(int bufferSize,
337 [int numberOfInputChannels, int numberOfOutputChannels]) { 345 [int numberOfInputChannels, int numberOfOutputChannels]) {
338 var function = JS('=Object', '#.createScriptProcessor || ' 346 var function = JS(
339 '#.createJavaScriptNode', this, this); 347 '=Object',
348 '#.createScriptProcessor || '
349 '#.createJavaScriptNode',
350 this,
351 this);
340 if (numberOfOutputChannels != null) { 352 if (numberOfOutputChannels != null) {
341 return JS('ScriptProcessorNode', '#.call(#, #, #, #)', function, this, 353 return JS('ScriptProcessorNode', '#.call(#, #, #, #)', function, this,
342 bufferSize, numberOfInputChannels, numberOfOutputChannels); 354 bufferSize, numberOfInputChannels, numberOfOutputChannels);
343 } else if (numberOfInputChannels != null) { 355 } else if (numberOfInputChannels != null) {
344 return JS('ScriptProcessorNode', '#.call(#, #, #)', function, this, 356 return JS('ScriptProcessorNode', '#.call(#, #, #)', function, this,
345 bufferSize, numberOfInputChannels); 357 bufferSize, numberOfInputChannels);
346 } else { 358 } else {
347 return JS('ScriptProcessorNode', '#.call(#, #)', function, this, 359 return JS(
348 bufferSize); 360 'ScriptProcessorNode', '#.call(#, #)', function, this, bufferSize);
349 } 361 }
350 } 362 }
363
351 @DomName('AudioContext.decodeAudioData') 364 @DomName('AudioContext.decodeAudioData')
352 Future<AudioBuffer> decodeAudioData(ByteBuffer audioData) { 365 Future<AudioBuffer> decodeAudioData(ByteBuffer audioData) {
353 var completer = new Completer<AudioBuffer>(); 366 var completer = new Completer<AudioBuffer>();
354 _decodeAudioData(audioData, 367 _decodeAudioData(audioData, (value) {
355 (value) { completer.complete(value); }, 368 completer.complete(value);
356 (error) { 369 }, (error) {
357 if (error == null) { 370 if (error == null) {
358 completer.completeError(''); 371 completer.completeError('');
359 } else { 372 } else {
360 completer.completeError(error); 373 completer.completeError(error);
361 } 374 }
362 }); 375 });
363 return completer.future; 376 return completer.future;
364 } 377 }
365 } 378 }
366 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 379 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
367 // for details. All rights reserved. Use of this source code is governed by a 380 // for details. All rights reserved. Use of this source code is governed by a
368 // BSD-style license that can be found in the LICENSE file. 381 // BSD-style license that can be found in the LICENSE file.
369 382
370
371 @DocsEditable() 383 @DocsEditable()
372 @DomName('AudioDestinationNode') 384 @DomName('AudioDestinationNode')
373 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioDe stinationNode-section 385 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioDe stinationNode-section
374 @Experimental() 386 @Experimental()
375 @Native("AudioDestinationNode") 387 @Native("AudioDestinationNode")
376 class AudioDestinationNode extends AudioNode { 388 class AudioDestinationNode extends AudioNode {
377 // To suppress missing implicit constructor warnings. 389 // To suppress missing implicit constructor warnings.
378 factory AudioDestinationNode._() { throw new UnsupportedError("Not supported") ; } 390 factory AudioDestinationNode._() {
391 throw new UnsupportedError("Not supported");
392 }
379 393
380 @DomName('AudioDestinationNode.maxChannelCount') 394 @DomName('AudioDestinationNode.maxChannelCount')
381 @DocsEditable() 395 @DocsEditable()
382 final int maxChannelCount; 396 final int maxChannelCount;
383 } 397 }
384 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 398 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
385 // for details. All rights reserved. Use of this source code is governed by a 399 // for details. All rights reserved. Use of this source code is governed by a
386 // BSD-style license that can be found in the LICENSE file. 400 // BSD-style license that can be found in the LICENSE file.
387 401
388
389 @DocsEditable() 402 @DocsEditable()
390 @DomName('AudioListener') 403 @DomName('AudioListener')
391 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioLi stener-section 404 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioLi stener-section
392 @Experimental() 405 @Experimental()
393 @Native("AudioListener") 406 @Native("AudioListener")
394 class AudioListener extends Interceptor { 407 class AudioListener extends Interceptor {
395 // To suppress missing implicit constructor warnings. 408 // To suppress missing implicit constructor warnings.
396 factory AudioListener._() { throw new UnsupportedError("Not supported"); } 409 factory AudioListener._() {
410 throw new UnsupportedError("Not supported");
411 }
397 412
398 @DomName('AudioListener.dopplerFactor') 413 @DomName('AudioListener.dopplerFactor')
399 @DocsEditable() 414 @DocsEditable()
400 num dopplerFactor; 415 num dopplerFactor;
401 416
402 @DomName('AudioListener.speedOfSound') 417 @DomName('AudioListener.speedOfSound')
403 @DocsEditable() 418 @DocsEditable()
404 num speedOfSound; 419 num speedOfSound;
405 420
406 @DomName('AudioListener.setOrientation') 421 @DomName('AudioListener.setOrientation')
407 @DocsEditable() 422 @DocsEditable()
408 void setOrientation(num x, num y, num z, num xUp, num yUp, num zUp) native; 423 void setOrientation(num x, num y, num z, num xUp, num yUp, num zUp) native ;
409 424
410 @DomName('AudioListener.setPosition') 425 @DomName('AudioListener.setPosition')
411 @DocsEditable() 426 @DocsEditable()
412 void setPosition(num x, num y, num z) native; 427 void setPosition(num x, num y, num z) native ;
413 428
414 @DomName('AudioListener.setVelocity') 429 @DomName('AudioListener.setVelocity')
415 @DocsEditable() 430 @DocsEditable()
416 void setVelocity(num x, num y, num z) native; 431 void setVelocity(num x, num y, num z) native ;
417 } 432 }
418 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 433 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
419 // for details. All rights reserved. Use of this source code is governed by a 434 // for details. All rights reserved. Use of this source code is governed by a
420 // BSD-style license that can be found in the LICENSE file. 435 // BSD-style license that can be found in the LICENSE file.
421 436
422
423 @DomName('AudioNode') 437 @DomName('AudioNode')
424 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioNo de-section 438 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioNo de-section
425 @Experimental() 439 @Experimental()
426 @Native("AudioNode") 440 @Native("AudioNode")
427 class AudioNode extends EventTarget { 441 class AudioNode extends EventTarget {
428 // To suppress missing implicit constructor warnings. 442 // To suppress missing implicit constructor warnings.
429 factory AudioNode._() { throw new UnsupportedError("Not supported"); } 443 factory AudioNode._() {
444 throw new UnsupportedError("Not supported");
445 }
430 446
431 @DomName('AudioNode.channelCount') 447 @DomName('AudioNode.channelCount')
432 @DocsEditable() 448 @DocsEditable()
433 int channelCount; 449 int channelCount;
434 450
435 @DomName('AudioNode.channelCountMode') 451 @DomName('AudioNode.channelCountMode')
436 @DocsEditable() 452 @DocsEditable()
437 String channelCountMode; 453 String channelCountMode;
438 454
439 @DomName('AudioNode.channelInterpretation') 455 @DomName('AudioNode.channelInterpretation')
440 @DocsEditable() 456 @DocsEditable()
441 String channelInterpretation; 457 String channelInterpretation;
442 458
443 @DomName('AudioNode.context') 459 @DomName('AudioNode.context')
444 @DocsEditable() 460 @DocsEditable()
445 final AudioContext context; 461 final AudioContext context;
446 462
447 @DomName('AudioNode.numberOfInputs') 463 @DomName('AudioNode.numberOfInputs')
448 @DocsEditable() 464 @DocsEditable()
449 final int numberOfInputs; 465 final int numberOfInputs;
450 466
451 @DomName('AudioNode.numberOfOutputs') 467 @DomName('AudioNode.numberOfOutputs')
452 @DocsEditable() 468 @DocsEditable()
453 final int numberOfOutputs; 469 final int numberOfOutputs;
454 470
455 @JSName('connect') 471 @JSName('connect')
456 @DomName('AudioNode.connect') 472 @DomName('AudioNode.connect')
457 @DocsEditable() 473 @DocsEditable()
458 void _connect(destination, int output, [int input]) native; 474 void _connect(destination, int output, [int input]) native ;
459 475
460 @DomName('AudioNode.disconnect') 476 @DomName('AudioNode.disconnect')
461 @DocsEditable() 477 @DocsEditable()
462 void disconnect(int output) native; 478 void disconnect(int output) native ;
463 479
464 @DomName('AudioNode.connect') 480 @DomName('AudioNode.connect')
465 void connectNode(AudioNode destination, [int output = 0, int input = 0]) => 481 void connectNode(AudioNode destination, [int output = 0, int input = 0]) =>
466 _connect(destination, output, input); 482 _connect(destination, output, input);
467 483
468 @DomName('AudioNode.connect') 484 @DomName('AudioNode.connect')
469 void connectParam(AudioParam destination, [int output = 0]) => 485 void connectParam(AudioParam destination, [int output = 0]) =>
470 _connect(destination, output); 486 _connect(destination, output);
471 } 487 }
472 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 488 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
473 // for details. All rights reserved. Use of this source code is governed by a 489 // for details. All rights reserved. Use of this source code is governed by a
474 // BSD-style license that can be found in the LICENSE file. 490 // BSD-style license that can be found in the LICENSE file.
475 491
476
477 @DocsEditable() 492 @DocsEditable()
478 @DomName('AudioParam') 493 @DomName('AudioParam')
479 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPa ram 494 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPa ram
480 @Experimental() 495 @Experimental()
481 @Native("AudioParam") 496 @Native("AudioParam")
482 class AudioParam extends Interceptor { 497 class AudioParam extends Interceptor {
483 // To suppress missing implicit constructor warnings. 498 // To suppress missing implicit constructor warnings.
484 factory AudioParam._() { throw new UnsupportedError("Not supported"); } 499 factory AudioParam._() {
500 throw new UnsupportedError("Not supported");
501 }
485 502
486 @DomName('AudioParam.defaultValue') 503 @DomName('AudioParam.defaultValue')
487 @DocsEditable() 504 @DocsEditable()
488 final double defaultValue; 505 final double defaultValue;
489 506
490 @DomName('AudioParam.value') 507 @DomName('AudioParam.value')
491 @DocsEditable() 508 @DocsEditable()
492 num value; 509 num value;
493 510
494 @DomName('AudioParam.cancelScheduledValues') 511 @DomName('AudioParam.cancelScheduledValues')
495 @DocsEditable() 512 @DocsEditable()
496 void cancelScheduledValues(num startTime) native; 513 void cancelScheduledValues(num startTime) native ;
497 514
498 @DomName('AudioParam.exponentialRampToValueAtTime') 515 @DomName('AudioParam.exponentialRampToValueAtTime')
499 @DocsEditable() 516 @DocsEditable()
500 void exponentialRampToValueAtTime(num value, num time) native; 517 void exponentialRampToValueAtTime(num value, num time) native ;
501 518
502 @DomName('AudioParam.linearRampToValueAtTime') 519 @DomName('AudioParam.linearRampToValueAtTime')
503 @DocsEditable() 520 @DocsEditable()
504 void linearRampToValueAtTime(num value, num time) native; 521 void linearRampToValueAtTime(num value, num time) native ;
505 522
506 @DomName('AudioParam.setTargetAtTime') 523 @DomName('AudioParam.setTargetAtTime')
507 @DocsEditable() 524 @DocsEditable()
508 void setTargetAtTime(num target, num time, num timeConstant) native; 525 void setTargetAtTime(num target, num time, num timeConstant) native ;
509 526
510 @DomName('AudioParam.setValueAtTime') 527 @DomName('AudioParam.setValueAtTime')
511 @DocsEditable() 528 @DocsEditable()
512 void setValueAtTime(num value, num time) native; 529 void setValueAtTime(num value, num time) native ;
513 530
514 @DomName('AudioParam.setValueCurveAtTime') 531 @DomName('AudioParam.setValueCurveAtTime')
515 @DocsEditable() 532 @DocsEditable()
516 void setValueCurveAtTime(Float32List values, num time, num duration) native; 533 void setValueCurveAtTime(Float32List values, num time, num duration) native ;
517 } 534 }
518 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 535 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
519 // for details. All rights reserved. Use of this source code is governed by a 536 // for details. All rights reserved. Use of this source code is governed by a
520 // BSD-style license that can be found in the LICENSE file. 537 // BSD-style license that can be found in the LICENSE file.
521 538
522
523 @DocsEditable() 539 @DocsEditable()
524 @DomName('AudioProcessingEvent') 540 @DomName('AudioProcessingEvent')
525 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPr ocessingEvent-section 541 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPr ocessingEvent-section
526 @Experimental() 542 @Experimental()
527 @Native("AudioProcessingEvent") 543 @Native("AudioProcessingEvent")
528 class AudioProcessingEvent extends Event { 544 class AudioProcessingEvent extends Event {
529 // To suppress missing implicit constructor warnings. 545 // To suppress missing implicit constructor warnings.
530 factory AudioProcessingEvent._() { throw new UnsupportedError("Not supported") ; } 546 factory AudioProcessingEvent._() {
547 throw new UnsupportedError("Not supported");
548 }
531 549
532 @DomName('AudioProcessingEvent.inputBuffer') 550 @DomName('AudioProcessingEvent.inputBuffer')
533 @DocsEditable() 551 @DocsEditable()
534 final AudioBuffer inputBuffer; 552 final AudioBuffer inputBuffer;
535 553
536 @DomName('AudioProcessingEvent.outputBuffer') 554 @DomName('AudioProcessingEvent.outputBuffer')
537 @DocsEditable() 555 @DocsEditable()
538 final AudioBuffer outputBuffer; 556 final AudioBuffer outputBuffer;
539 557
540 @DomName('AudioProcessingEvent.playbackTime') 558 @DomName('AudioProcessingEvent.playbackTime')
541 @DocsEditable() 559 @DocsEditable()
542 @Experimental() // untriaged 560 @Experimental() // untriaged
543 final double playbackTime; 561 final double playbackTime;
544 } 562 }
545 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 563 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
546 // for details. All rights reserved. Use of this source code is governed by a 564 // for details. All rights reserved. Use of this source code is governed by a
547 // BSD-style license that can be found in the LICENSE file. 565 // BSD-style license that can be found in the LICENSE file.
548 566
549
550 @DocsEditable() 567 @DocsEditable()
551 @DomName('AudioSourceNode') 568 @DomName('AudioSourceNode')
552 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html 569 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
553 @Experimental() 570 @Experimental()
554 @Native("AudioSourceNode") 571 @Native("AudioSourceNode")
555 class AudioSourceNode extends AudioNode { 572 class AudioSourceNode extends AudioNode {
556 // To suppress missing implicit constructor warnings. 573 // To suppress missing implicit constructor warnings.
557 factory AudioSourceNode._() { throw new UnsupportedError("Not supported"); } 574 factory AudioSourceNode._() {
575 throw new UnsupportedError("Not supported");
576 }
558 } 577 }
559 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 578 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
560 // for details. All rights reserved. Use of this source code is governed by a 579 // for details. All rights reserved. Use of this source code is governed by a
561 // BSD-style license that can be found in the LICENSE file. 580 // BSD-style license that can be found in the LICENSE file.
562 581
563
564 @DocsEditable() 582 @DocsEditable()
565 @DomName('BiquadFilterNode') 583 @DomName('BiquadFilterNode')
566 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#BiquadF ilterNode-section 584 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#BiquadF ilterNode-section
567 @Experimental() 585 @Experimental()
568 @Native("BiquadFilterNode") 586 @Native("BiquadFilterNode")
569 class BiquadFilterNode extends AudioNode { 587 class BiquadFilterNode extends AudioNode {
570 // To suppress missing implicit constructor warnings. 588 // To suppress missing implicit constructor warnings.
571 factory BiquadFilterNode._() { throw new UnsupportedError("Not supported"); } 589 factory BiquadFilterNode._() {
590 throw new UnsupportedError("Not supported");
591 }
572 592
573 @DomName('BiquadFilterNode.Q') 593 @DomName('BiquadFilterNode.Q')
574 @DocsEditable() 594 @DocsEditable()
575 final AudioParam Q; 595 final AudioParam Q;
576 596
577 @DomName('BiquadFilterNode.detune') 597 @DomName('BiquadFilterNode.detune')
578 @DocsEditable() 598 @DocsEditable()
579 final AudioParam detune; 599 final AudioParam detune;
580 600
581 @DomName('BiquadFilterNode.frequency') 601 @DomName('BiquadFilterNode.frequency')
582 @DocsEditable() 602 @DocsEditable()
583 final AudioParam frequency; 603 final AudioParam frequency;
584 604
585 @DomName('BiquadFilterNode.gain') 605 @DomName('BiquadFilterNode.gain')
586 @DocsEditable() 606 @DocsEditable()
587 final AudioParam gain; 607 final AudioParam gain;
588 608
589 @DomName('BiquadFilterNode.type') 609 @DomName('BiquadFilterNode.type')
590 @DocsEditable() 610 @DocsEditable()
591 String type; 611 String type;
592 612
593 @DomName('BiquadFilterNode.getFrequencyResponse') 613 @DomName('BiquadFilterNode.getFrequencyResponse')
594 @DocsEditable() 614 @DocsEditable()
595 void getFrequencyResponse(Float32List frequencyHz, Float32List magResponse, Fl oat32List phaseResponse) native; 615 void getFrequencyResponse(Float32List frequencyHz, Float32List magResponse,
616 Float32List phaseResponse) native ;
596 } 617 }
597 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 618 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
598 // for details. All rights reserved. Use of this source code is governed by a 619 // for details. All rights reserved. Use of this source code is governed by a
599 // BSD-style license that can be found in the LICENSE file. 620 // BSD-style license that can be found in the LICENSE file.
600 621
601
602 @DocsEditable() 622 @DocsEditable()
603 @DomName('ChannelMergerNode') 623 @DomName('ChannelMergerNode')
604 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Channel MergerNode-section 624 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Channel MergerNode-section
605 @Experimental() 625 @Experimental()
606 @Native("ChannelMergerNode,AudioChannelMerger") 626 @Native("ChannelMergerNode,AudioChannelMerger")
607 class ChannelMergerNode extends AudioNode { 627 class ChannelMergerNode extends AudioNode {
608 // To suppress missing implicit constructor warnings. 628 // To suppress missing implicit constructor warnings.
609 factory ChannelMergerNode._() { throw new UnsupportedError("Not supported"); } 629 factory ChannelMergerNode._() {
630 throw new UnsupportedError("Not supported");
631 }
610 } 632 }
611 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 633 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
612 // for details. All rights reserved. Use of this source code is governed by a 634 // for details. All rights reserved. Use of this source code is governed by a
613 // BSD-style license that can be found in the LICENSE file. 635 // BSD-style license that can be found in the LICENSE file.
614 636
615
616 @DocsEditable() 637 @DocsEditable()
617 @DomName('ChannelSplitterNode') 638 @DomName('ChannelSplitterNode')
618 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Channel SplitterNode-section 639 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Channel SplitterNode-section
619 @Experimental() 640 @Experimental()
620 @Native("ChannelSplitterNode,AudioChannelSplitter") 641 @Native("ChannelSplitterNode,AudioChannelSplitter")
621 class ChannelSplitterNode extends AudioNode { 642 class ChannelSplitterNode extends AudioNode {
622 // To suppress missing implicit constructor warnings. 643 // To suppress missing implicit constructor warnings.
623 factory ChannelSplitterNode._() { throw new UnsupportedError("Not supported"); } 644 factory ChannelSplitterNode._() {
645 throw new UnsupportedError("Not supported");
646 }
624 } 647 }
625 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 648 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
626 // for details. All rights reserved. Use of this source code is governed by a 649 // for details. All rights reserved. Use of this source code is governed by a
627 // BSD-style license that can be found in the LICENSE file. 650 // BSD-style license that can be found in the LICENSE file.
628 651
629
630 @DocsEditable() 652 @DocsEditable()
631 @DomName('ConvolverNode') 653 @DomName('ConvolverNode')
632 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Convolv erNode 654 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Convolv erNode
633 @Experimental() 655 @Experimental()
634 @Native("ConvolverNode") 656 @Native("ConvolverNode")
635 class ConvolverNode extends AudioNode { 657 class ConvolverNode extends AudioNode {
636 // To suppress missing implicit constructor warnings. 658 // To suppress missing implicit constructor warnings.
637 factory ConvolverNode._() { throw new UnsupportedError("Not supported"); } 659 factory ConvolverNode._() {
660 throw new UnsupportedError("Not supported");
661 }
638 662
639 @DomName('ConvolverNode.buffer') 663 @DomName('ConvolverNode.buffer')
640 @DocsEditable() 664 @DocsEditable()
641 AudioBuffer buffer; 665 AudioBuffer buffer;
642 666
643 @DomName('ConvolverNode.normalize') 667 @DomName('ConvolverNode.normalize')
644 @DocsEditable() 668 @DocsEditable()
645 bool normalize; 669 bool normalize;
646 } 670 }
647 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 671 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
648 // for details. All rights reserved. Use of this source code is governed by a 672 // for details. All rights reserved. Use of this source code is governed by a
649 // BSD-style license that can be found in the LICENSE file. 673 // BSD-style license that can be found in the LICENSE file.
650 674
651
652 @DocsEditable() 675 @DocsEditable()
653 @DomName('DelayNode') 676 @DomName('DelayNode')
654 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#DelayNo de 677 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#DelayNo de
655 @Experimental() 678 @Experimental()
656 @Native("DelayNode") 679 @Native("DelayNode")
657 class DelayNode extends AudioNode { 680 class DelayNode extends AudioNode {
658 // To suppress missing implicit constructor warnings. 681 // To suppress missing implicit constructor warnings.
659 factory DelayNode._() { throw new UnsupportedError("Not supported"); } 682 factory DelayNode._() {
683 throw new UnsupportedError("Not supported");
684 }
660 685
661 @DomName('DelayNode.delayTime') 686 @DomName('DelayNode.delayTime')
662 @DocsEditable() 687 @DocsEditable()
663 final AudioParam delayTime; 688 final AudioParam delayTime;
664 } 689 }
665 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 690 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
666 // for details. All rights reserved. Use of this source code is governed by a 691 // for details. All rights reserved. Use of this source code is governed by a
667 // BSD-style license that can be found in the LICENSE file. 692 // BSD-style license that can be found in the LICENSE file.
668 693
669
670 @DocsEditable() 694 @DocsEditable()
671 @DomName('DynamicsCompressorNode') 695 @DomName('DynamicsCompressorNode')
672 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Dynamic sCompressorNode 696 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Dynamic sCompressorNode
673 @Experimental() 697 @Experimental()
674 @Native("DynamicsCompressorNode") 698 @Native("DynamicsCompressorNode")
675 class DynamicsCompressorNode extends AudioNode { 699 class DynamicsCompressorNode extends AudioNode {
676 // To suppress missing implicit constructor warnings. 700 // To suppress missing implicit constructor warnings.
677 factory DynamicsCompressorNode._() { throw new UnsupportedError("Not supported "); } 701 factory DynamicsCompressorNode._() {
702 throw new UnsupportedError("Not supported");
703 }
678 704
679 @DomName('DynamicsCompressorNode.attack') 705 @DomName('DynamicsCompressorNode.attack')
680 @DocsEditable() 706 @DocsEditable()
681 final AudioParam attack; 707 final AudioParam attack;
682 708
683 @DomName('DynamicsCompressorNode.knee') 709 @DomName('DynamicsCompressorNode.knee')
684 @DocsEditable() 710 @DocsEditable()
685 final AudioParam knee; 711 final AudioParam knee;
686 712
687 @DomName('DynamicsCompressorNode.ratio') 713 @DomName('DynamicsCompressorNode.ratio')
688 @DocsEditable() 714 @DocsEditable()
689 final AudioParam ratio; 715 final AudioParam ratio;
690 716
691 @DomName('DynamicsCompressorNode.reduction') 717 @DomName('DynamicsCompressorNode.reduction')
692 @DocsEditable() 718 @DocsEditable()
693 final AudioParam reduction; 719 final AudioParam reduction;
694 720
695 @DomName('DynamicsCompressorNode.release') 721 @DomName('DynamicsCompressorNode.release')
696 @DocsEditable() 722 @DocsEditable()
697 final AudioParam release; 723 final AudioParam release;
698 724
699 @DomName('DynamicsCompressorNode.threshold') 725 @DomName('DynamicsCompressorNode.threshold')
700 @DocsEditable() 726 @DocsEditable()
701 final AudioParam threshold; 727 final AudioParam threshold;
702 } 728 }
703 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 729 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
704 // for details. All rights reserved. Use of this source code is governed by a 730 // for details. All rights reserved. Use of this source code is governed by a
705 // BSD-style license that can be found in the LICENSE file. 731 // BSD-style license that can be found in the LICENSE file.
706 732
707
708 @DocsEditable() 733 @DocsEditable()
709 @DomName('GainNode') 734 @DomName('GainNode')
710 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#GainNod e 735 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#GainNod e
711 @Experimental() 736 @Experimental()
712 @Native("GainNode,AudioGainNode") 737 @Native("GainNode,AudioGainNode")
713 class GainNode extends AudioNode { 738 class GainNode extends AudioNode {
714 // To suppress missing implicit constructor warnings. 739 // To suppress missing implicit constructor warnings.
715 factory GainNode._() { throw new UnsupportedError("Not supported"); } 740 factory GainNode._() {
741 throw new UnsupportedError("Not supported");
742 }
716 743
717 @DomName('GainNode.gain') 744 @DomName('GainNode.gain')
718 @DocsEditable() 745 @DocsEditable()
719 final AudioParam gain; 746 final AudioParam gain;
720 } 747 }
721 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 748 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
722 // for details. All rights reserved. Use of this source code is governed by a 749 // for details. All rights reserved. Use of this source code is governed by a
723 // BSD-style license that can be found in the LICENSE file. 750 // BSD-style license that can be found in the LICENSE file.
724 751
725
726 @DocsEditable() 752 @DocsEditable()
727 @DomName('MediaElementAudioSourceNode') 753 @DomName('MediaElementAudioSourceNode')
728 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaEl ementAudioSourceNode 754 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaEl ementAudioSourceNode
729 @Experimental() 755 @Experimental()
730 @Native("MediaElementAudioSourceNode") 756 @Native("MediaElementAudioSourceNode")
731 class MediaElementAudioSourceNode extends AudioSourceNode { 757 class MediaElementAudioSourceNode extends AudioSourceNode {
732 // To suppress missing implicit constructor warnings. 758 // To suppress missing implicit constructor warnings.
733 factory MediaElementAudioSourceNode._() { throw new UnsupportedError("Not supp orted"); } 759 factory MediaElementAudioSourceNode._() {
760 throw new UnsupportedError("Not supported");
761 }
734 762
735 @DomName('MediaElementAudioSourceNode.mediaElement') 763 @DomName('MediaElementAudioSourceNode.mediaElement')
736 @DocsEditable() 764 @DocsEditable()
737 @Experimental() // non-standard 765 @Experimental() // non-standard
738 final MediaElement mediaElement; 766 final MediaElement mediaElement;
739 } 767 }
740 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 768 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
741 // for details. All rights reserved. Use of this source code is governed by a 769 // for details. All rights reserved. Use of this source code is governed by a
742 // BSD-style license that can be found in the LICENSE file. 770 // BSD-style license that can be found in the LICENSE file.
743 771
744
745 @DocsEditable() 772 @DocsEditable()
746 @DomName('MediaStreamAudioDestinationNode') 773 @DomName('MediaStreamAudioDestinationNode')
747 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaSt reamAudioDestinationNode 774 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaSt reamAudioDestinationNode
748 @Experimental() 775 @Experimental()
749 @Native("MediaStreamAudioDestinationNode") 776 @Native("MediaStreamAudioDestinationNode")
750 class MediaStreamAudioDestinationNode extends AudioNode { 777 class MediaStreamAudioDestinationNode extends AudioNode {
751 // To suppress missing implicit constructor warnings. 778 // To suppress missing implicit constructor warnings.
752 factory MediaStreamAudioDestinationNode._() { throw new UnsupportedError("Not supported"); } 779 factory MediaStreamAudioDestinationNode._() {
780 throw new UnsupportedError("Not supported");
781 }
753 782
754 @DomName('MediaStreamAudioDestinationNode.stream') 783 @DomName('MediaStreamAudioDestinationNode.stream')
755 @DocsEditable() 784 @DocsEditable()
756 final MediaStream stream; 785 final MediaStream stream;
757 } 786 }
758 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 787 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
759 // for details. All rights reserved. Use of this source code is governed by a 788 // for details. All rights reserved. Use of this source code is governed by a
760 // BSD-style license that can be found in the LICENSE file. 789 // BSD-style license that can be found in the LICENSE file.
761 790
762
763 @DocsEditable() 791 @DocsEditable()
764 @DomName('MediaStreamAudioSourceNode') 792 @DomName('MediaStreamAudioSourceNode')
765 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaSt reamAudioSourceNode 793 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaSt reamAudioSourceNode
766 @Experimental() 794 @Experimental()
767 @Native("MediaStreamAudioSourceNode") 795 @Native("MediaStreamAudioSourceNode")
768 class MediaStreamAudioSourceNode extends AudioSourceNode { 796 class MediaStreamAudioSourceNode extends AudioSourceNode {
769 // To suppress missing implicit constructor warnings. 797 // To suppress missing implicit constructor warnings.
770 factory MediaStreamAudioSourceNode._() { throw new UnsupportedError("Not suppo rted"); } 798 factory MediaStreamAudioSourceNode._() {
799 throw new UnsupportedError("Not supported");
800 }
771 801
772 @DomName('MediaStreamAudioSourceNode.mediaStream') 802 @DomName('MediaStreamAudioSourceNode.mediaStream')
773 @DocsEditable() 803 @DocsEditable()
774 final MediaStream mediaStream; 804 final MediaStream mediaStream;
775 } 805 }
776 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 806 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
777 // for details. All rights reserved. Use of this source code is governed by a 807 // for details. All rights reserved. Use of this source code is governed by a
778 // BSD-style license that can be found in the LICENSE file. 808 // BSD-style license that can be found in the LICENSE file.
779 809
780
781 @DocsEditable() 810 @DocsEditable()
782 @DomName('OfflineAudioCompletionEvent') 811 @DomName('OfflineAudioCompletionEvent')
783 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Offline AudioCompletionEvent-section 812 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Offline AudioCompletionEvent-section
784 @Experimental() 813 @Experimental()
785 @Native("OfflineAudioCompletionEvent") 814 @Native("OfflineAudioCompletionEvent")
786 class OfflineAudioCompletionEvent extends Event { 815 class OfflineAudioCompletionEvent extends Event {
787 // To suppress missing implicit constructor warnings. 816 // To suppress missing implicit constructor warnings.
788 factory OfflineAudioCompletionEvent._() { throw new UnsupportedError("Not supp orted"); } 817 factory OfflineAudioCompletionEvent._() {
818 throw new UnsupportedError("Not supported");
819 }
789 820
790 @DomName('OfflineAudioCompletionEvent.renderedBuffer') 821 @DomName('OfflineAudioCompletionEvent.renderedBuffer')
791 @DocsEditable() 822 @DocsEditable()
792 final AudioBuffer renderedBuffer; 823 final AudioBuffer renderedBuffer;
793 } 824 }
794 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 825 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
795 // for details. All rights reserved. Use of this source code is governed by a 826 // for details. All rights reserved. Use of this source code is governed by a
796 // BSD-style license that can be found in the LICENSE file. 827 // BSD-style license that can be found in the LICENSE file.
797 828
798
799 @DocsEditable() 829 @DocsEditable()
800 @DomName('OfflineAudioContext') 830 @DomName('OfflineAudioContext')
801 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Offline AudioContext-section 831 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Offline AudioContext-section
802 @Experimental() 832 @Experimental()
803 @Native("OfflineAudioContext") 833 @Native("OfflineAudioContext")
804 class OfflineAudioContext extends AudioContext { 834 class OfflineAudioContext extends AudioContext {
805 // To suppress missing implicit constructor warnings. 835 // To suppress missing implicit constructor warnings.
806 factory OfflineAudioContext._() { throw new UnsupportedError("Not supported"); } 836 factory OfflineAudioContext._() {
837 throw new UnsupportedError("Not supported");
838 }
807 839
808 @DomName('OfflineAudioContext.OfflineAudioContext') 840 @DomName('OfflineAudioContext.OfflineAudioContext')
809 @DocsEditable() 841 @DocsEditable()
810 factory OfflineAudioContext(int numberOfChannels, int numberOfFrames, num samp leRate) { 842 factory OfflineAudioContext(
811 return OfflineAudioContext._create_1(numberOfChannels, numberOfFrames, sampl eRate); 843 int numberOfChannels, int numberOfFrames, num sampleRate) {
844 return OfflineAudioContext._create_1(
845 numberOfChannels, numberOfFrames, sampleRate);
812 } 846 }
813 static OfflineAudioContext _create_1(numberOfChannels, numberOfFrames, sampleR ate) => JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)', numberOfChan nels, numberOfFrames, sampleRate); 847 static OfflineAudioContext _create_1(
848 numberOfChannels, numberOfFrames, sampleRate) =>
849 JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)',
850 numberOfChannels, numberOfFrames, sampleRate);
814 } 851 }
815 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 852 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
816 // for details. All rights reserved. Use of this source code is governed by a 853 // for details. All rights reserved. Use of this source code is governed by a
817 // BSD-style license that can be found in the LICENSE file. 854 // BSD-style license that can be found in the LICENSE file.
818 855
819
820 @DocsEditable() 856 @DocsEditable()
821 @DomName('OscillatorNode') 857 @DomName('OscillatorNode')
822 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Osc illatorNode 858 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Osc illatorNode
823 @Experimental() 859 @Experimental()
824 @Native("OscillatorNode,Oscillator") 860 @Native("OscillatorNode,Oscillator")
825 class OscillatorNode extends AudioSourceNode { 861 class OscillatorNode extends AudioSourceNode {
826 // To suppress missing implicit constructor warnings. 862 // To suppress missing implicit constructor warnings.
827 factory OscillatorNode._() { throw new UnsupportedError("Not supported"); } 863 factory OscillatorNode._() {
864 throw new UnsupportedError("Not supported");
865 }
828 866
829 /** 867 /**
830 * Static factory designed to expose `ended` events to event 868 * Static factory designed to expose `ended` events to event
831 * handlers that are not necessarily instances of [OscillatorNode]. 869 * handlers that are not necessarily instances of [OscillatorNode].
832 * 870 *
833 * See [EventStreamProvider] for usage information. 871 * See [EventStreamProvider] for usage information.
834 */ 872 */
835 @DomName('OscillatorNode.endedEvent') 873 @DomName('OscillatorNode.endedEvent')
836 @DocsEditable() 874 @DocsEditable()
837 @Experimental() // untriaged 875 @Experimental() // untriaged
838 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider <Event>('ended'); 876 static const EventStreamProvider<Event> endedEvent =
877 const EventStreamProvider<Event>('ended');
839 878
840 @DomName('OscillatorNode.detune') 879 @DomName('OscillatorNode.detune')
841 @DocsEditable() 880 @DocsEditable()
842 final AudioParam detune; 881 final AudioParam detune;
843 882
844 @DomName('OscillatorNode.frequency') 883 @DomName('OscillatorNode.frequency')
845 @DocsEditable() 884 @DocsEditable()
846 final AudioParam frequency; 885 final AudioParam frequency;
847 886
848 @DomName('OscillatorNode.type') 887 @DomName('OscillatorNode.type')
849 @DocsEditable() 888 @DocsEditable()
850 String type; 889 String type;
851 890
852 @DomName('OscillatorNode.noteOff') 891 @DomName('OscillatorNode.noteOff')
853 @DocsEditable() 892 @DocsEditable()
854 void noteOff(num when) native; 893 void noteOff(num when) native ;
855 894
856 @DomName('OscillatorNode.noteOn') 895 @DomName('OscillatorNode.noteOn')
857 @DocsEditable() 896 @DocsEditable()
858 void noteOn(num when) native; 897 void noteOn(num when) native ;
859 898
860 @DomName('OscillatorNode.setPeriodicWave') 899 @DomName('OscillatorNode.setPeriodicWave')
861 @DocsEditable() 900 @DocsEditable()
862 @Experimental() // untriaged 901 @Experimental() // untriaged
863 void setPeriodicWave(PeriodicWave periodicWave) native; 902 void setPeriodicWave(PeriodicWave periodicWave) native ;
864 903
865 @DomName('OscillatorNode.start') 904 @DomName('OscillatorNode.start')
866 @DocsEditable() 905 @DocsEditable()
867 void start([num when]) native; 906 void start([num when]) native ;
868 907
869 @DomName('OscillatorNode.stop') 908 @DomName('OscillatorNode.stop')
870 @DocsEditable() 909 @DocsEditable()
871 void stop([num when]) native; 910 void stop([num when]) native ;
872 911
873 /// Stream of `ended` events handled by this [OscillatorNode]. 912 /// Stream of `ended` events handled by this [OscillatorNode].
874 @DomName('OscillatorNode.onended') 913 @DomName('OscillatorNode.onended')
875 @DocsEditable() 914 @DocsEditable()
876 @Experimental() // untriaged 915 @Experimental() // untriaged
877 Stream<Event> get onEnded => endedEvent.forTarget(this); 916 Stream<Event> get onEnded => endedEvent.forTarget(this);
878 } 917 }
879 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 918 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
880 // for details. All rights reserved. Use of this source code is governed by a 919 // for details. All rights reserved. Use of this source code is governed by a
881 // BSD-style license that can be found in the LICENSE file. 920 // BSD-style license that can be found in the LICENSE file.
882 921
883
884 @DocsEditable() 922 @DocsEditable()
885 @DomName('PannerNode') 923 @DomName('PannerNode')
886 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#PannerN ode 924 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#PannerN ode
887 @Experimental() 925 @Experimental()
888 @Native("PannerNode,AudioPannerNode,webkitAudioPannerNode") 926 @Native("PannerNode,AudioPannerNode,webkitAudioPannerNode")
889 class PannerNode extends AudioNode { 927 class PannerNode extends AudioNode {
890 // To suppress missing implicit constructor warnings. 928 // To suppress missing implicit constructor warnings.
891 factory PannerNode._() { throw new UnsupportedError("Not supported"); } 929 factory PannerNode._() {
930 throw new UnsupportedError("Not supported");
931 }
892 932
893 @DomName('PannerNode.coneInnerAngle') 933 @DomName('PannerNode.coneInnerAngle')
894 @DocsEditable() 934 @DocsEditable()
895 num coneInnerAngle; 935 num coneInnerAngle;
896 936
897 @DomName('PannerNode.coneOuterAngle') 937 @DomName('PannerNode.coneOuterAngle')
898 @DocsEditable() 938 @DocsEditable()
899 num coneOuterAngle; 939 num coneOuterAngle;
900 940
901 @DomName('PannerNode.coneOuterGain') 941 @DomName('PannerNode.coneOuterGain')
(...skipping 15 matching lines...) Expand all
917 @DomName('PannerNode.refDistance') 957 @DomName('PannerNode.refDistance')
918 @DocsEditable() 958 @DocsEditable()
919 num refDistance; 959 num refDistance;
920 960
921 @DomName('PannerNode.rolloffFactor') 961 @DomName('PannerNode.rolloffFactor')
922 @DocsEditable() 962 @DocsEditable()
923 num rolloffFactor; 963 num rolloffFactor;
924 964
925 @DomName('PannerNode.setOrientation') 965 @DomName('PannerNode.setOrientation')
926 @DocsEditable() 966 @DocsEditable()
927 void setOrientation(num x, num y, num z) native; 967 void setOrientation(num x, num y, num z) native ;
928 968
929 @DomName('PannerNode.setPosition') 969 @DomName('PannerNode.setPosition')
930 @DocsEditable() 970 @DocsEditable()
931 void setPosition(num x, num y, num z) native; 971 void setPosition(num x, num y, num z) native ;
932 972
933 @DomName('PannerNode.setVelocity') 973 @DomName('PannerNode.setVelocity')
934 @DocsEditable() 974 @DocsEditable()
935 void setVelocity(num x, num y, num z) native; 975 void setVelocity(num x, num y, num z) native ;
936 } 976 }
937 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 977 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
938 // for details. All rights reserved. Use of this source code is governed by a 978 // for details. All rights reserved. Use of this source code is governed by a
939 // BSD-style license that can be found in the LICENSE file. 979 // BSD-style license that can be found in the LICENSE file.
940 980
941
942 @DocsEditable() 981 @DocsEditable()
943 @DomName('PeriodicWave') 982 @DomName('PeriodicWave')
944 @Experimental() // untriaged 983 @Experimental() // untriaged
945 @Native("PeriodicWave") 984 @Native("PeriodicWave")
946 class PeriodicWave extends Interceptor { 985 class PeriodicWave extends Interceptor {
947 // To suppress missing implicit constructor warnings. 986 // To suppress missing implicit constructor warnings.
948 factory PeriodicWave._() { throw new UnsupportedError("Not supported"); } 987 factory PeriodicWave._() {
988 throw new UnsupportedError("Not supported");
989 }
949 } 990 }
950 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 991 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
951 // for details. All rights reserved. Use of this source code is governed by a 992 // for details. All rights reserved. Use of this source code is governed by a
952 // BSD-style license that can be found in the LICENSE file. 993 // BSD-style license that can be found in the LICENSE file.
953 994
954
955 @DocsEditable() 995 @DocsEditable()
956 @DomName('ScriptProcessorNode') 996 @DomName('ScriptProcessorNode')
957 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ScriptP rocessorNode 997 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ScriptP rocessorNode
958 @Experimental() 998 @Experimental()
959 @Native("ScriptProcessorNode,JavaScriptAudioNode") 999 @Native("ScriptProcessorNode,JavaScriptAudioNode")
960 class ScriptProcessorNode extends AudioNode { 1000 class ScriptProcessorNode extends AudioNode {
961 // To suppress missing implicit constructor warnings. 1001 // To suppress missing implicit constructor warnings.
962 factory ScriptProcessorNode._() { throw new UnsupportedError("Not supported"); } 1002 factory ScriptProcessorNode._() {
1003 throw new UnsupportedError("Not supported");
1004 }
963 1005
964 /** 1006 /**
965 * Static factory designed to expose `audioprocess` events to event 1007 * Static factory designed to expose `audioprocess` events to event
966 * handlers that are not necessarily instances of [ScriptProcessorNode]. 1008 * handlers that are not necessarily instances of [ScriptProcessorNode].
967 * 1009 *
968 * See [EventStreamProvider] for usage information. 1010 * See [EventStreamProvider] for usage information.
969 */ 1011 */
970 @DomName('ScriptProcessorNode.audioprocessEvent') 1012 @DomName('ScriptProcessorNode.audioprocessEvent')
971 @DocsEditable() 1013 @DocsEditable()
972 @Experimental() // untriaged 1014 @Experimental() // untriaged
973 static const EventStreamProvider<AudioProcessingEvent> audioProcessEvent = con st EventStreamProvider<AudioProcessingEvent>('audioprocess'); 1015 static const EventStreamProvider<AudioProcessingEvent> audioProcessEvent =
1016 const EventStreamProvider<AudioProcessingEvent>('audioprocess');
974 1017
975 @DomName('ScriptProcessorNode.bufferSize') 1018 @DomName('ScriptProcessorNode.bufferSize')
976 @DocsEditable() 1019 @DocsEditable()
977 final int bufferSize; 1020 final int bufferSize;
978 1021
979 @DomName('ScriptProcessorNode.setEventListener') 1022 @DomName('ScriptProcessorNode.setEventListener')
980 @DocsEditable() 1023 @DocsEditable()
981 @Experimental() // untriaged 1024 @Experimental() // untriaged
982 void setEventListener(EventListener eventListener) native; 1025 void setEventListener(EventListener eventListener) native ;
983 1026
984 /// Stream of `audioprocess` events handled by this [ScriptProcessorNode]. 1027 /// Stream of `audioprocess` events handled by this [ScriptProcessorNode].
985 /** 1028 /**
986 * Get a Stream that fires events when AudioProcessingEvents occur. 1029 * Get a Stream that fires events when AudioProcessingEvents occur.
987 * This particular stream is special in that it only allows one listener to a 1030 * 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 1031 * given stream. Converting the returned Stream [asBroadcast] will likely ruin
989 * the soft-real-time properties which which these events are fired and can 1032 * the soft-real-time properties which which these events are fired and can
990 * be processed. 1033 * be processed.
991 */ 1034 */
992 @DomName('ScriptProcessorNode.onaudioprocess') 1035 @DomName('ScriptProcessorNode.onaudioprocess')
993 @DocsEditable() 1036 @DocsEditable()
994 @Experimental() // untriaged 1037 @Experimental() // untriaged
995 Stream<AudioProcessingEvent> get onAudioProcess => audioProcessEvent.forTarget (this); 1038 Stream<AudioProcessingEvent> get onAudioProcess =>
1039 audioProcessEvent.forTarget(this);
996 } 1040 }
997 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1041 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
998 // for details. All rights reserved. Use of this source code is governed by a 1042 // for details. All rights reserved. Use of this source code is governed by a
999 // BSD-style license that can be found in the LICENSE file. 1043 // BSD-style license that can be found in the LICENSE file.
1000 1044
1001
1002 @DocsEditable() 1045 @DocsEditable()
1003 @DomName('WaveShaperNode') 1046 @DomName('WaveShaperNode')
1004 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Wav eShaperNode 1047 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Wav eShaperNode
1005 @Experimental() 1048 @Experimental()
1006 @Native("WaveShaperNode") 1049 @Native("WaveShaperNode")
1007 class WaveShaperNode extends AudioNode { 1050 class WaveShaperNode extends AudioNode {
1008 // To suppress missing implicit constructor warnings. 1051 // To suppress missing implicit constructor warnings.
1009 factory WaveShaperNode._() { throw new UnsupportedError("Not supported"); } 1052 factory WaveShaperNode._() {
1053 throw new UnsupportedError("Not supported");
1054 }
1010 1055
1011 @DomName('WaveShaperNode.curve') 1056 @DomName('WaveShaperNode.curve')
1012 @DocsEditable() 1057 @DocsEditable()
1013 Float32List curve; 1058 Float32List curve;
1014 1059
1015 @DomName('WaveShaperNode.oversample') 1060 @DomName('WaveShaperNode.oversample')
1016 @DocsEditable() 1061 @DocsEditable()
1017 String oversample; 1062 String oversample;
1018 } 1063 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698