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

Side by Side Diff: sdk/lib/web_audio/dartium/web_audio_dartium.dart

Issue 1763753002: Revert "Changes to tests and status file for the 45 roll w/ regenderated sdk/libs" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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';
(...skipping 29 matching lines...) Expand all
40 'GainNode': () => GainNode, 40 'GainNode': () => GainNode,
41 'MediaElementAudioSourceNode': () => MediaElementAudioSourceNode, 41 'MediaElementAudioSourceNode': () => MediaElementAudioSourceNode,
42 'MediaStreamAudioDestinationNode': () => MediaStreamAudioDestinationNode, 42 'MediaStreamAudioDestinationNode': () => MediaStreamAudioDestinationNode,
43 'MediaStreamAudioSourceNode': () => MediaStreamAudioSourceNode, 43 'MediaStreamAudioSourceNode': () => MediaStreamAudioSourceNode,
44 'OfflineAudioCompletionEvent': () => OfflineAudioCompletionEvent, 44 'OfflineAudioCompletionEvent': () => OfflineAudioCompletionEvent,
45 'OfflineAudioContext': () => OfflineAudioContext, 45 'OfflineAudioContext': () => OfflineAudioContext,
46 'OscillatorNode': () => OscillatorNode, 46 'OscillatorNode': () => OscillatorNode,
47 'PannerNode': () => PannerNode, 47 'PannerNode': () => PannerNode,
48 'PeriodicWave': () => PeriodicWave, 48 'PeriodicWave': () => PeriodicWave,
49 'ScriptProcessorNode': () => ScriptProcessorNode, 49 'ScriptProcessorNode': () => ScriptProcessorNode,
50 'StereoPannerNode': () => StereoPannerNode,
51 'WaveShaperNode': () => WaveShaperNode, 50 'WaveShaperNode': () => WaveShaperNode,
52 51
53 }; 52 };
54 53
55 // FIXME: Can we make this private? 54 // FIXME: Can we make this private?
56 @Deprecated("Internal Use Only") 55 @Deprecated("Internal Use Only")
57 final web_audioBlinkFunctionMap = { 56 final web_audioBlinkFunctionMap = {
58 'AnalyserNode': () => AnalyserNode.internalCreateAnalyserNode, 57 'AnalyserNode': () => AnalyserNode.internalCreateAnalyserNode,
59 'AudioBuffer': () => AudioBuffer.internalCreateAudioBuffer, 58 'AudioBuffer': () => AudioBuffer.internalCreateAudioBuffer,
60 'AudioBufferSourceNode': () => AudioBufferSourceNode.internalCreateAudioBuffer SourceNode, 59 'AudioBufferSourceNode': () => AudioBufferSourceNode.internalCreateAudioBuffer SourceNode,
(...skipping 13 matching lines...) Expand all
74 'GainNode': () => GainNode.internalCreateGainNode, 73 'GainNode': () => GainNode.internalCreateGainNode,
75 'MediaElementAudioSourceNode': () => MediaElementAudioSourceNode.internalCreat eMediaElementAudioSourceNode, 74 'MediaElementAudioSourceNode': () => MediaElementAudioSourceNode.internalCreat eMediaElementAudioSourceNode,
76 'MediaStreamAudioDestinationNode': () => MediaStreamAudioDestinationNode.inter nalCreateMediaStreamAudioDestinationNode, 75 'MediaStreamAudioDestinationNode': () => MediaStreamAudioDestinationNode.inter nalCreateMediaStreamAudioDestinationNode,
77 'MediaStreamAudioSourceNode': () => MediaStreamAudioSourceNode.internalCreateM ediaStreamAudioSourceNode, 76 'MediaStreamAudioSourceNode': () => MediaStreamAudioSourceNode.internalCreateM ediaStreamAudioSourceNode,
78 'OfflineAudioCompletionEvent': () => OfflineAudioCompletionEvent.internalCreat eOfflineAudioCompletionEvent, 77 'OfflineAudioCompletionEvent': () => OfflineAudioCompletionEvent.internalCreat eOfflineAudioCompletionEvent,
79 'OfflineAudioContext': () => OfflineAudioContext.internalCreateOfflineAudioCon text, 78 'OfflineAudioContext': () => OfflineAudioContext.internalCreateOfflineAudioCon text,
80 'OscillatorNode': () => OscillatorNode.internalCreateOscillatorNode, 79 'OscillatorNode': () => OscillatorNode.internalCreateOscillatorNode,
81 'PannerNode': () => PannerNode.internalCreatePannerNode, 80 'PannerNode': () => PannerNode.internalCreatePannerNode,
82 'PeriodicWave': () => PeriodicWave.internalCreatePeriodicWave, 81 'PeriodicWave': () => PeriodicWave.internalCreatePeriodicWave,
83 'ScriptProcessorNode': () => ScriptProcessorNode.internalCreateScriptProcessor Node, 82 'ScriptProcessorNode': () => ScriptProcessorNode.internalCreateScriptProcessor Node,
84 'StereoPannerNode': () => StereoPannerNode.internalCreateStereoPannerNode,
85 'WaveShaperNode': () => WaveShaperNode.internalCreateWaveShaperNode, 83 'WaveShaperNode': () => WaveShaperNode.internalCreateWaveShaperNode,
86 84
87 }; 85 };
88 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 86 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
89 // for details. All rights reserved. Use of this source code is governed by a 87 // for details. All rights reserved. Use of this source code is governed by a
90 // BSD-style license that can be found in the LICENSE file. 88 // BSD-style license that can be found in the LICENSE file.
91 89
92 // WARNING: Do not edit - generated code. 90 // WARNING: Do not edit - generated code.
93 91
94 92
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 @DomName('AnalyserNode.smoothingTimeConstant') 141 @DomName('AnalyserNode.smoothingTimeConstant')
144 @DocsEditable() 142 @DocsEditable()
145 num get smoothingTimeConstant => _blink.BlinkAnalyserNode.instance.smoothingTi meConstant_Getter_(unwrap_jso(this)); 143 num get smoothingTimeConstant => _blink.BlinkAnalyserNode.instance.smoothingTi meConstant_Getter_(unwrap_jso(this));
146 144
147 @DomName('AnalyserNode.smoothingTimeConstant') 145 @DomName('AnalyserNode.smoothingTimeConstant')
148 @DocsEditable() 146 @DocsEditable()
149 set smoothingTimeConstant(num value) => _blink.BlinkAnalyserNode.instance.smoo thingTimeConstant_Setter_(unwrap_jso(this), value); 147 set smoothingTimeConstant(num value) => _blink.BlinkAnalyserNode.instance.smoo thingTimeConstant_Setter_(unwrap_jso(this), value);
150 148
151 @DomName('AnalyserNode.getByteFrequencyData') 149 @DomName('AnalyserNode.getByteFrequencyData')
152 @DocsEditable() 150 @DocsEditable()
153 void getByteFrequencyData(Uint8List array) => _blink.BlinkAnalyserNode.instanc e.getByteFrequencyData_Callback_1_(unwrap_jso(this), unwrap_jso(array)); 151 void getByteFrequencyData(Uint8List array) => _blink.BlinkAnalyserNode.instanc e.getByteFrequencyData_Callback_1_(unwrap_jso(this), array);
154 152
155 @DomName('AnalyserNode.getByteTimeDomainData') 153 @DomName('AnalyserNode.getByteTimeDomainData')
156 @DocsEditable() 154 @DocsEditable()
157 void getByteTimeDomainData(Uint8List array) => _blink.BlinkAnalyserNode.instan ce.getByteTimeDomainData_Callback_1_(unwrap_jso(this), unwrap_jso(array)); 155 void getByteTimeDomainData(Uint8List array) => _blink.BlinkAnalyserNode.instan ce.getByteTimeDomainData_Callback_1_(unwrap_jso(this), array);
158 156
159 @DomName('AnalyserNode.getFloatFrequencyData') 157 @DomName('AnalyserNode.getFloatFrequencyData')
160 @DocsEditable() 158 @DocsEditable()
161 void getFloatFrequencyData(Float32List array) => _blink.BlinkAnalyserNode.inst ance.getFloatFrequencyData_Callback_1_(unwrap_jso(this), unwrap_jso(array)); 159 void getFloatFrequencyData(Float32List array) => _blink.BlinkAnalyserNode.inst ance.getFloatFrequencyData_Callback_1_(unwrap_jso(this), array);
162 160
163 @DomName('AnalyserNode.getFloatTimeDomainData') 161 @DomName('AnalyserNode.getFloatTimeDomainData')
164 @DocsEditable() 162 @DocsEditable()
165 @Experimental() // untriaged 163 @Experimental() // untriaged
166 void getFloatTimeDomainData(Float32List array) => _blink.BlinkAnalyserNode.ins tance.getFloatTimeDomainData_Callback_1_(unwrap_jso(this), unwrap_jso(array)); 164 void getFloatTimeDomainData(Float32List array) => _blink.BlinkAnalyserNode.ins tance.getFloatTimeDomainData_Callback_1_(unwrap_jso(this), array);
167 165
168 } 166 }
169 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 167 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
170 // for details. All rights reserved. Use of this source code is governed by a 168 // for details. All rights reserved. Use of this source code is governed by a
171 // BSD-style license that can be found in the LICENSE file. 169 // BSD-style license that can be found in the LICENSE file.
172 170
173 // WARNING: Do not edit - generated code. 171 // WARNING: Do not edit - generated code.
174 172
175 173
176 @DocsEditable() 174 @DocsEditable()
(...skipping 28 matching lines...) Expand all
205 int get length => _blink.BlinkAudioBuffer.instance.length_Getter_(unwrap_jso(t his)); 203 int get length => _blink.BlinkAudioBuffer.instance.length_Getter_(unwrap_jso(t his));
206 204
207 @DomName('AudioBuffer.numberOfChannels') 205 @DomName('AudioBuffer.numberOfChannels')
208 @DocsEditable() 206 @DocsEditable()
209 int get numberOfChannels => _blink.BlinkAudioBuffer.instance.numberOfChannels_ Getter_(unwrap_jso(this)); 207 int get numberOfChannels => _blink.BlinkAudioBuffer.instance.numberOfChannels_ Getter_(unwrap_jso(this));
210 208
211 @DomName('AudioBuffer.sampleRate') 209 @DomName('AudioBuffer.sampleRate')
212 @DocsEditable() 210 @DocsEditable()
213 num get sampleRate => _blink.BlinkAudioBuffer.instance.sampleRate_Getter_(unwr ap_jso(this)); 211 num get sampleRate => _blink.BlinkAudioBuffer.instance.sampleRate_Getter_(unwr ap_jso(this));
214 212
215 void copyFromChannel(Float32List destination, int channelNumber, [int startInC hannel]) {
216 if (startInChannel != null) {
217 _blink.BlinkAudioBuffer.instance.copyFromChannel_Callback_3_(unwrap_jso(th is), unwrap_jso(destination), channelNumber, startInChannel);
218 return;
219 }
220 _blink.BlinkAudioBuffer.instance.copyFromChannel_Callback_2_(unwrap_jso(this ), unwrap_jso(destination), channelNumber);
221 return;
222 }
223
224 void copyToChannel(Float32List source, int channelNumber, [int startInChannel] ) {
225 if (startInChannel != null) {
226 _blink.BlinkAudioBuffer.instance.copyToChannel_Callback_3_(unwrap_jso(this ), unwrap_jso(source), channelNumber, startInChannel);
227 return;
228 }
229 _blink.BlinkAudioBuffer.instance.copyToChannel_Callback_2_(unwrap_jso(this), unwrap_jso(source), channelNumber);
230 return;
231 }
232
233 @DomName('AudioBuffer.getChannelData') 213 @DomName('AudioBuffer.getChannelData')
234 @DocsEditable() 214 @DocsEditable()
235 Float32List getChannelData(int channelIndex) => wrap_jso(_blink.BlinkAudioBuff er.instance.getChannelData_Callback_1_(unwrap_jso(this), channelIndex)); 215 Float32List getChannelData(int channelIndex) => _blink.BlinkAudioBuffer.instan ce.getChannelData_Callback_1_(unwrap_jso(this), channelIndex);
236 216
237 } 217 }
238 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 218 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
239 // for details. All rights reserved. Use of this source code is governed by a 219 // for details. All rights reserved. Use of this source code is governed by a
240 // BSD-style license that can be found in the LICENSE file. 220 // BSD-style license that can be found in the LICENSE file.
241 221
242 // WARNING: Do not edit - generated code. 222 // WARNING: Do not edit - generated code.
243 223
244 224
245 @DomName('AudioBufferCallback') 225 @DomName('AudioBufferCallback')
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 267
288 268
289 @DomName('AudioBufferSourceNode.buffer') 269 @DomName('AudioBufferSourceNode.buffer')
290 @DocsEditable() 270 @DocsEditable()
291 AudioBuffer get buffer => wrap_jso(_blink.BlinkAudioBufferSourceNode.instance. buffer_Getter_(unwrap_jso(this))); 271 AudioBuffer get buffer => wrap_jso(_blink.BlinkAudioBufferSourceNode.instance. buffer_Getter_(unwrap_jso(this)));
292 272
293 @DomName('AudioBufferSourceNode.buffer') 273 @DomName('AudioBufferSourceNode.buffer')
294 @DocsEditable() 274 @DocsEditable()
295 set buffer(AudioBuffer value) => _blink.BlinkAudioBufferSourceNode.instance.bu ffer_Setter_(unwrap_jso(this), unwrap_jso(value)); 275 set buffer(AudioBuffer value) => _blink.BlinkAudioBufferSourceNode.instance.bu ffer_Setter_(unwrap_jso(this), unwrap_jso(value));
296 276
297 @DomName('AudioBufferSourceNode.detune')
298 @DocsEditable()
299 @Experimental() // untriaged
300 AudioParam get detune => wrap_jso(_blink.BlinkAudioBufferSourceNode.instance.d etune_Getter_(unwrap_jso(this)));
301
302 @DomName('AudioBufferSourceNode.loop') 277 @DomName('AudioBufferSourceNode.loop')
303 @DocsEditable() 278 @DocsEditable()
304 bool get loop => _blink.BlinkAudioBufferSourceNode.instance.loop_Getter_(unwra p_jso(this)); 279 bool get loop => _blink.BlinkAudioBufferSourceNode.instance.loop_Getter_(unwra p_jso(this));
305 280
306 @DomName('AudioBufferSourceNode.loop') 281 @DomName('AudioBufferSourceNode.loop')
307 @DocsEditable() 282 @DocsEditable()
308 set loop(bool value) => _blink.BlinkAudioBufferSourceNode.instance.loop_Setter _(unwrap_jso(this), value); 283 set loop(bool value) => _blink.BlinkAudioBufferSourceNode.instance.loop_Setter _(unwrap_jso(this), value);
309 284
310 @DomName('AudioBufferSourceNode.loopEnd') 285 @DomName('AudioBufferSourceNode.loopEnd')
311 @DocsEditable() 286 @DocsEditable()
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 342
368 @DomName('AudioContext') 343 @DomName('AudioContext')
369 @SupportedBrowser(SupportedBrowser.CHROME) 344 @SupportedBrowser(SupportedBrowser.CHROME)
370 @SupportedBrowser(SupportedBrowser.FIREFOX) 345 @SupportedBrowser(SupportedBrowser.FIREFOX)
371 @Experimental() 346 @Experimental()
372 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioCo ntext-section 347 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioCo ntext-section
373 class AudioContext extends EventTarget { 348 class AudioContext extends EventTarget {
374 // To suppress missing implicit constructor warnings. 349 // To suppress missing implicit constructor warnings.
375 factory AudioContext._() { throw new UnsupportedError("Not supported"); } 350 factory AudioContext._() { throw new UnsupportedError("Not supported"); }
376 351
352 /**
353 * Static factory designed to expose `complete` events to event
354 * handlers that are not necessarily instances of [AudioContext].
355 *
356 * See [EventStreamProvider] for usage information.
357 */
358 @DomName('AudioContext.completeEvent')
359 @DocsEditable()
360 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi der<Event>('complete');
361
377 @DomName('AudioContext.AudioContext') 362 @DomName('AudioContext.AudioContext')
378 @DocsEditable() 363 @DocsEditable()
379 factory AudioContext() { 364 factory AudioContext() {
380 return wrap_jso(_blink.BlinkAudioContext.instance.constructorCallback_0_()); 365 return wrap_jso(_blink.BlinkAudioContext.instance.constructorCallback_0_());
381 } 366 }
382 367
383 368
384 @Deprecated("Internal Use Only") 369 @Deprecated("Internal Use Only")
385 static AudioContext internalCreateAudioContext() { 370 static AudioContext internalCreateAudioContext() {
386 return new AudioContext._internalWrap(); 371 return new AudioContext._internalWrap();
(...skipping 17 matching lines...) Expand all
404 AudioDestinationNode get destination => wrap_jso(_blink.BlinkAudioContext.inst ance.destination_Getter_(unwrap_jso(this))); 389 AudioDestinationNode get destination => wrap_jso(_blink.BlinkAudioContext.inst ance.destination_Getter_(unwrap_jso(this)));
405 390
406 @DomName('AudioContext.listener') 391 @DomName('AudioContext.listener')
407 @DocsEditable() 392 @DocsEditable()
408 AudioListener get listener => wrap_jso(_blink.BlinkAudioContext.instance.liste ner_Getter_(unwrap_jso(this))); 393 AudioListener get listener => wrap_jso(_blink.BlinkAudioContext.instance.liste ner_Getter_(unwrap_jso(this)));
409 394
410 @DomName('AudioContext.sampleRate') 395 @DomName('AudioContext.sampleRate')
411 @DocsEditable() 396 @DocsEditable()
412 num get sampleRate => _blink.BlinkAudioContext.instance.sampleRate_Getter_(unw rap_jso(this)); 397 num get sampleRate => _blink.BlinkAudioContext.instance.sampleRate_Getter_(unw rap_jso(this));
413 398
414 @DomName('AudioContext.state')
415 @DocsEditable()
416 @Experimental() // untriaged
417 String get state => _blink.BlinkAudioContext.instance.state_Getter_(unwrap_jso (this));
418
419 @DomName('AudioContext.close')
420 @DocsEditable()
421 @Experimental() // untriaged
422 Future close() => wrap_jso(_blink.BlinkAudioContext.instance.close_Callback_0_ (unwrap_jso(this)));
423
424 @DomName('AudioContext.createAnalyser') 399 @DomName('AudioContext.createAnalyser')
425 @DocsEditable() 400 @DocsEditable()
426 AnalyserNode createAnalyser() => wrap_jso(_blink.BlinkAudioContext.instance.cr eateAnalyser_Callback_0_(unwrap_jso(this))); 401 AnalyserNode createAnalyser() => wrap_jso(_blink.BlinkAudioContext.instance.cr eateAnalyser_Callback_0_(unwrap_jso(this)));
427 402
428 @DomName('AudioContext.createBiquadFilter') 403 @DomName('AudioContext.createBiquadFilter')
429 @DocsEditable() 404 @DocsEditable()
430 BiquadFilterNode createBiquadFilter() => wrap_jso(_blink.BlinkAudioContext.ins tance.createBiquadFilter_Callback_0_(unwrap_jso(this))); 405 BiquadFilterNode createBiquadFilter() => wrap_jso(_blink.BlinkAudioContext.ins tance.createBiquadFilter_Callback_0_(unwrap_jso(this)));
431 406
432 @DomName('AudioContext.createBuffer') 407 @DomName('AudioContext.createBuffer')
433 @DocsEditable() 408 @DocsEditable()
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 @DocsEditable() 461 @DocsEditable()
487 OscillatorNode createOscillator() => wrap_jso(_blink.BlinkAudioContext.instanc e.createOscillator_Callback_0_(unwrap_jso(this))); 462 OscillatorNode createOscillator() => wrap_jso(_blink.BlinkAudioContext.instanc e.createOscillator_Callback_0_(unwrap_jso(this)));
488 463
489 @DomName('AudioContext.createPanner') 464 @DomName('AudioContext.createPanner')
490 @DocsEditable() 465 @DocsEditable()
491 PannerNode createPanner() => wrap_jso(_blink.BlinkAudioContext.instance.create Panner_Callback_0_(unwrap_jso(this))); 466 PannerNode createPanner() => wrap_jso(_blink.BlinkAudioContext.instance.create Panner_Callback_0_(unwrap_jso(this)));
492 467
493 @DomName('AudioContext.createPeriodicWave') 468 @DomName('AudioContext.createPeriodicWave')
494 @DocsEditable() 469 @DocsEditable()
495 @Experimental() // untriaged 470 @Experimental() // untriaged
496 PeriodicWave createPeriodicWave(Float32List real, Float32List imag) => wrap_js o(_blink.BlinkAudioContext.instance.createPeriodicWave_Callback_2_(unwrap_jso(th is), unwrap_jso(real), unwrap_jso(imag))); 471 PeriodicWave createPeriodicWave(Float32List real, Float32List imag) => wrap_js o(_blink.BlinkAudioContext.instance.createPeriodicWave_Callback_2_(unwrap_jso(th is), real, imag));
497 472
498 ScriptProcessorNode createScriptProcessor([int bufferSize, int numberOfInputCh annels, int numberOfOutputChannels]) { 473 ScriptProcessorNode createScriptProcessor([int bufferSize, int numberOfInputCh annels, int numberOfOutputChannels]) {
499 if (numberOfOutputChannels != null) { 474 if (numberOfOutputChannels != null) {
500 return wrap_jso(_blink.BlinkAudioContext.instance.createScriptProcessor_Ca llback_3_(unwrap_jso(this), bufferSize, numberOfInputChannels, numberOfOutputCha nnels)); 475 return wrap_jso(_blink.BlinkAudioContext.instance.createScriptProcessor_Ca llback_3_(unwrap_jso(this), bufferSize, numberOfInputChannels, numberOfOutputCha nnels));
501 } 476 }
502 if (numberOfInputChannels != null) { 477 if (numberOfInputChannels != null) {
503 return wrap_jso(_blink.BlinkAudioContext.instance.createScriptProcessor_Ca llback_2_(unwrap_jso(this), bufferSize, numberOfInputChannels)); 478 return wrap_jso(_blink.BlinkAudioContext.instance.createScriptProcessor_Ca llback_2_(unwrap_jso(this), bufferSize, numberOfInputChannels));
504 } 479 }
505 if (bufferSize != null) { 480 if (bufferSize != null) {
506 return wrap_jso(_blink.BlinkAudioContext.instance.createScriptProcessor_Ca llback_1_(unwrap_jso(this), bufferSize)); 481 return wrap_jso(_blink.BlinkAudioContext.instance.createScriptProcessor_Ca llback_1_(unwrap_jso(this), bufferSize));
507 } 482 }
508 return wrap_jso(_blink.BlinkAudioContext.instance.createScriptProcessor_Call back_0_(unwrap_jso(this))); 483 return wrap_jso(_blink.BlinkAudioContext.instance.createScriptProcessor_Call back_0_(unwrap_jso(this)));
509 } 484 }
510 485
511 @DomName('AudioContext.createStereoPanner')
512 @DocsEditable()
513 @Experimental() // untriaged
514 StereoPannerNode createStereoPanner() => wrap_jso(_blink.BlinkAudioContext.ins tance.createStereoPanner_Callback_0_(unwrap_jso(this)));
515
516 @DomName('AudioContext.createWaveShaper') 486 @DomName('AudioContext.createWaveShaper')
517 @DocsEditable() 487 @DocsEditable()
518 WaveShaperNode createWaveShaper() => wrap_jso(_blink.BlinkAudioContext.instanc e.createWaveShaper_Callback_0_(unwrap_jso(this))); 488 WaveShaperNode createWaveShaper() => wrap_jso(_blink.BlinkAudioContext.instanc e.createWaveShaper_Callback_0_(unwrap_jso(this)));
519 489
520 void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallbac k, [AudioBufferCallback errorCallback]) { 490 @DomName('AudioContext.decodeAudioData')
521 if (errorCallback != null) { 491 @DocsEditable()
522 _blink.BlinkAudioContext.instance.decodeAudioData_Callback_3_(unwrap_jso(t his), unwrap_jso(audioData), unwrap_jso((audioBuffer) => successCallback(wrap_js o(audioBuffer))), unwrap_jso((audioBuffer) => errorCallback(wrap_jso(audioBuffer )))); 492 void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallbac k, [AudioBufferCallback errorCallback]) => _blink.BlinkAudioContext.instance.dec odeAudioData_Callback_3_(unwrap_jso(this), audioData, unwrap_jso((audioBuffer) = > successCallback(wrap_jso(audioBuffer))), unwrap_jso((audioBuffer) => errorCall back(wrap_jso(audioBuffer))));
523 return; 493
524 } 494 @DomName('AudioContext.startRendering')
525 _blink.BlinkAudioContext.instance.decodeAudioData_Callback_2_(unwrap_jso(thi s), unwrap_jso(audioData), unwrap_jso((audioBuffer) => successCallback(wrap_jso( audioBuffer)))); 495 @DocsEditable()
526 return; 496 void startRendering() => _blink.BlinkAudioContext.instance.startRendering_Call back_0_(unwrap_jso(this));
527 } 497
498 /// Stream of `complete` events handled by this [AudioContext].
499 @DomName('AudioContext.oncomplete')
500 @DocsEditable()
501 Stream<Event> get onComplete => completeEvent.forTarget(this);
528 502
529 @DomName('AudioContext.resume')
530 @DocsEditable()
531 @Experimental() // untriaged
532 Future resume() => wrap_jso(_blink.BlinkAudioContext.instance.resume_Callback_ 0_(unwrap_jso(this)));
533
534 @DomName('AudioContext.suspend')
535 @DocsEditable()
536 @Experimental() // untriaged
537 Future suspend() => wrap_jso(_blink.BlinkAudioContext.instance.suspend_Callbac k_0_(unwrap_jso(this)));
538
539 @DomName('AudioContext.decodeAudioData') 503 @DomName('AudioContext.decodeAudioData')
540 Future<AudioBuffer> decodeAudioData(ByteBuffer audioData) { 504 Future<AudioBuffer> decodeAudioData(ByteBuffer audioData) {
541 var completer = new Completer<AudioBuffer>(); 505 var completer = new Completer<AudioBuffer>();
542 _decodeAudioData(audioData, 506 _decodeAudioData(audioData,
543 (value) { completer.complete(value); }, 507 (value) { completer.complete(value); },
544 (error) { 508 (error) {
545 if (error == null) { 509 if (error == null) {
546 completer.completeError(''); 510 completer.completeError('');
547 } else { 511 } else {
548 completer.completeError(error); 512 completer.completeError(error);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 AudioContext get context => wrap_jso(_blink.BlinkAudioNode.instance.context_Ge tter_(unwrap_jso(this))); 659 AudioContext get context => wrap_jso(_blink.BlinkAudioNode.instance.context_Ge tter_(unwrap_jso(this)));
696 660
697 @DomName('AudioNode.numberOfInputs') 661 @DomName('AudioNode.numberOfInputs')
698 @DocsEditable() 662 @DocsEditable()
699 int get numberOfInputs => _blink.BlinkAudioNode.instance.numberOfInputs_Getter _(unwrap_jso(this)); 663 int get numberOfInputs => _blink.BlinkAudioNode.instance.numberOfInputs_Getter _(unwrap_jso(this));
700 664
701 @DomName('AudioNode.numberOfOutputs') 665 @DomName('AudioNode.numberOfOutputs')
702 @DocsEditable() 666 @DocsEditable()
703 int get numberOfOutputs => _blink.BlinkAudioNode.instance.numberOfOutputs_Gett er_(unwrap_jso(this)); 667 int get numberOfOutputs => _blink.BlinkAudioNode.instance.numberOfOutputs_Gett er_(unwrap_jso(this));
704 668
705 void _connect(destination, [int output, int input]) { 669 void _connect(destination, int output, [int input]) {
706 if ((destination is AudioNode) && output == null && input == null) { 670 if ((input is int || input == null) && (output is int || output == null) && (destination is AudioNode || destination == null)) {
707 _blink.BlinkAudioNode.instance.connect_Callback_1_(unwrap_jso(this), unwra p_jso(destination));
708 return;
709 }
710 if ((output is int || output == null) && (destination is AudioNode) && input == null) {
711 _blink.BlinkAudioNode.instance.connect_Callback_2_(unwrap_jso(this), unwra p_jso(destination), output);
712 return;
713 }
714 if ((input is int || input == null) && (output is int || output == null) && (destination is AudioNode)) {
715 _blink.BlinkAudioNode.instance.connect_Callback_3_(unwrap_jso(this), unwra p_jso(destination), output, input); 671 _blink.BlinkAudioNode.instance.connect_Callback_3_(unwrap_jso(this), unwra p_jso(destination), output, input);
716 return; 672 return;
717 } 673 }
718 if ((destination is AudioParam) && output == null && input == null) { 674 if ((output is int || output == null) && (destination is AudioParam || desti nation == null) && input == null) {
719 _blink.BlinkAudioNode.instance.connect_Callback_1_(unwrap_jso(this), unwra p_jso(destination));
720 return;
721 }
722 if ((output is int || output == null) && (destination is AudioParam) && inpu t == null) {
723 _blink.BlinkAudioNode.instance.connect_Callback_2_(unwrap_jso(this), unwra p_jso(destination), output); 675 _blink.BlinkAudioNode.instance.connect_Callback_2_(unwrap_jso(this), unwra p_jso(destination), output);
724 return; 676 return;
725 } 677 }
726 throw new ArgumentError("Incorrect number or type of arguments"); 678 throw new ArgumentError("Incorrect number or type of arguments");
727 } 679 }
728 680
729 void disconnect([destination_OR_output, int output, int input]) { 681 @DomName('AudioNode.disconnect')
730 if (destination_OR_output == null && output == null && input == null) { 682 @DocsEditable()
731 _blink.BlinkAudioNode.instance.disconnect_Callback_0_(unwrap_jso(this)); 683 void disconnect(int output) => _blink.BlinkAudioNode.instance.disconnect_Callb ack_1_(unwrap_jso(this), output);
732 return; 684
733 }
734 if ((destination_OR_output is int) && output == null && input == null) {
735 _blink.BlinkAudioNode.instance.disconnect_Callback_1_(unwrap_jso(this), un wrap_jso(destination_OR_output));
736 return;
737 }
738 if ((destination_OR_output is AudioNode) && output == null && input == null) {
739 _blink.BlinkAudioNode.instance.disconnect_Callback_1_(unwrap_jso(this), un wrap_jso(destination_OR_output));
740 return;
741 }
742 if ((output is int) && (destination_OR_output is AudioNode) && input == null ) {
743 _blink.BlinkAudioNode.instance.disconnect_Callback_2_(unwrap_jso(this), un wrap_jso(destination_OR_output), output);
744 return;
745 }
746 if ((input is int) && (output is int) && (destination_OR_output is AudioNode )) {
747 _blink.BlinkAudioNode.instance.disconnect_Callback_3_(unwrap_jso(this), un wrap_jso(destination_OR_output), output, input);
748 return;
749 }
750 if ((destination_OR_output is AudioParam) && output == null && input == null ) {
751 _blink.BlinkAudioNode.instance.disconnect_Callback_1_(unwrap_jso(this), un wrap_jso(destination_OR_output));
752 return;
753 }
754 if ((output is int) && (destination_OR_output is AudioParam) && input == nul l) {
755 _blink.BlinkAudioNode.instance.disconnect_Callback_2_(unwrap_jso(this), un wrap_jso(destination_OR_output), output);
756 return;
757 }
758 throw new ArgumentError("Incorrect number or type of arguments");
759 }
760
761 @DomName('AudioNode.connect') 685 @DomName('AudioNode.connect')
762 void connectNode(AudioNode destination, [int output = 0, int input = 0]) => 686 void connectNode(AudioNode destination, [int output = 0, int input = 0]) =>
763 _connect(destination, output, input); 687 _connect(destination, output, input);
764 688
765 @DomName('AudioNode.connect') 689 @DomName('AudioNode.connect')
766 void connectParam(AudioParam destination, [int output = 0]) => 690 void connectParam(AudioParam destination, [int output = 0]) =>
767 _connect(destination, output); 691 _connect(destination, output);
768 } 692 }
769 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 693 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
770 // for details. All rights reserved. Use of this source code is governed by a 694 // for details. All rights reserved. Use of this source code is governed by a
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 @DomName('AudioParam.setTargetAtTime') 747 @DomName('AudioParam.setTargetAtTime')
824 @DocsEditable() 748 @DocsEditable()
825 void setTargetAtTime(num target, num time, num timeConstant) => _blink.BlinkAu dioParam.instance.setTargetAtTime_Callback_3_(unwrap_jso(this), target, time, ti meConstant); 749 void setTargetAtTime(num target, num time, num timeConstant) => _blink.BlinkAu dioParam.instance.setTargetAtTime_Callback_3_(unwrap_jso(this), target, time, ti meConstant);
826 750
827 @DomName('AudioParam.setValueAtTime') 751 @DomName('AudioParam.setValueAtTime')
828 @DocsEditable() 752 @DocsEditable()
829 void setValueAtTime(num value, num time) => _blink.BlinkAudioParam.instance.se tValueAtTime_Callback_2_(unwrap_jso(this), value, time); 753 void setValueAtTime(num value, num time) => _blink.BlinkAudioParam.instance.se tValueAtTime_Callback_2_(unwrap_jso(this), value, time);
830 754
831 @DomName('AudioParam.setValueCurveAtTime') 755 @DomName('AudioParam.setValueCurveAtTime')
832 @DocsEditable() 756 @DocsEditable()
833 void setValueCurveAtTime(Float32List values, num time, num duration) => _blink .BlinkAudioParam.instance.setValueCurveAtTime_Callback_3_(unwrap_jso(this), unwr ap_jso(values), time, duration); 757 void setValueCurveAtTime(Float32List values, num time, num duration) => _blink .BlinkAudioParam.instance.setValueCurveAtTime_Callback_3_(unwrap_jso(this), valu es, time, duration);
834 758
835 } 759 }
836 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 760 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
837 // for details. All rights reserved. Use of this source code is governed by a 761 // for details. All rights reserved. Use of this source code is governed by a
838 // BSD-style license that can be found in the LICENSE file. 762 // BSD-style license that can be found in the LICENSE file.
839 763
840 // WARNING: Do not edit - generated code. 764 // WARNING: Do not edit - generated code.
841 765
842 766
843 @DocsEditable() 767 @DocsEditable()
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 @DomName('BiquadFilterNode.type') 872 @DomName('BiquadFilterNode.type')
949 @DocsEditable() 873 @DocsEditable()
950 String get type => _blink.BlinkBiquadFilterNode.instance.type_Getter_(unwrap_j so(this)); 874 String get type => _blink.BlinkBiquadFilterNode.instance.type_Getter_(unwrap_j so(this));
951 875
952 @DomName('BiquadFilterNode.type') 876 @DomName('BiquadFilterNode.type')
953 @DocsEditable() 877 @DocsEditable()
954 set type(String value) => _blink.BlinkBiquadFilterNode.instance.type_Setter_(u nwrap_jso(this), value); 878 set type(String value) => _blink.BlinkBiquadFilterNode.instance.type_Setter_(u nwrap_jso(this), value);
955 879
956 @DomName('BiquadFilterNode.getFrequencyResponse') 880 @DomName('BiquadFilterNode.getFrequencyResponse')
957 @DocsEditable() 881 @DocsEditable()
958 void getFrequencyResponse(Float32List frequencyHz, Float32List magResponse, Fl oat32List phaseResponse) => _blink.BlinkBiquadFilterNode.instance.getFrequencyRe sponse_Callback_3_(unwrap_jso(this), unwrap_jso(frequencyHz), unwrap_jso(magResp onse), unwrap_jso(phaseResponse)); 882 void getFrequencyResponse(Float32List frequencyHz, Float32List magResponse, Fl oat32List phaseResponse) => _blink.BlinkBiquadFilterNode.instance.getFrequencyRe sponse_Callback_3_(unwrap_jso(this), frequencyHz, magResponse, phaseResponse);
959 883
960 } 884 }
961 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 885 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
962 // for details. All rights reserved. Use of this source code is governed by a 886 // for details. All rights reserved. Use of this source code is governed by a
963 // BSD-style license that can be found in the LICENSE file. 887 // BSD-style license that can be found in the LICENSE file.
964 888
965 // WARNING: Do not edit - generated code. 889 // WARNING: Do not edit - generated code.
966 890
967 891
968 @DocsEditable() 892 @DocsEditable()
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 static OfflineAudioContext internalCreateOfflineAudioContext() { 1253 static OfflineAudioContext internalCreateOfflineAudioContext() {
1330 return new OfflineAudioContext._internalWrap(); 1254 return new OfflineAudioContext._internalWrap();
1331 } 1255 }
1332 1256
1333 external factory OfflineAudioContext._internalWrap(); 1257 external factory OfflineAudioContext._internalWrap();
1334 1258
1335 @Deprecated("Internal Use Only") 1259 @Deprecated("Internal Use Only")
1336 OfflineAudioContext.internal_() : super.internal_(); 1260 OfflineAudioContext.internal_() : super.internal_();
1337 1261
1338 1262
1339 @DomName('OfflineAudioContext.startRendering')
1340 @DocsEditable()
1341 @Experimental() // untriaged
1342 Future startRendering() => wrap_jso(_blink.BlinkOfflineAudioContext.instance.s tartRendering_Callback_0_(unwrap_jso(this)));
1343
1344 } 1263 }
1345 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1264 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1346 // for details. All rights reserved. Use of this source code is governed by a 1265 // for details. All rights reserved. Use of this source code is governed by a
1347 // BSD-style license that can be found in the LICENSE file. 1266 // BSD-style license that can be found in the LICENSE file.
1348 1267
1349 // WARNING: Do not edit - generated code. 1268 // WARNING: Do not edit - generated code.
1350 1269
1351 1270
1352 @DocsEditable() 1271 @DocsEditable()
1353 @DomName('OscillatorNode') 1272 @DomName('OscillatorNode')
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 AudioParam get frequency => wrap_jso(_blink.BlinkOscillatorNode.instance.frequ ency_Getter_(unwrap_jso(this))); 1308 AudioParam get frequency => wrap_jso(_blink.BlinkOscillatorNode.instance.frequ ency_Getter_(unwrap_jso(this)));
1390 1309
1391 @DomName('OscillatorNode.type') 1310 @DomName('OscillatorNode.type')
1392 @DocsEditable() 1311 @DocsEditable()
1393 String get type => _blink.BlinkOscillatorNode.instance.type_Getter_(unwrap_jso (this)); 1312 String get type => _blink.BlinkOscillatorNode.instance.type_Getter_(unwrap_jso (this));
1394 1313
1395 @DomName('OscillatorNode.type') 1314 @DomName('OscillatorNode.type')
1396 @DocsEditable() 1315 @DocsEditable()
1397 set type(String value) => _blink.BlinkOscillatorNode.instance.type_Setter_(unw rap_jso(this), value); 1316 set type(String value) => _blink.BlinkOscillatorNode.instance.type_Setter_(unw rap_jso(this), value);
1398 1317
1318 @DomName('OscillatorNode.noteOff')
1319 @DocsEditable()
1320 void noteOff(num when) => _blink.BlinkOscillatorNode.instance.noteOff_Callback _1_(unwrap_jso(this), when);
1321
1322 @DomName('OscillatorNode.noteOn')
1323 @DocsEditable()
1324 void noteOn(num when) => _blink.BlinkOscillatorNode.instance.noteOn_Callback_1 _(unwrap_jso(this), when);
1325
1399 @DomName('OscillatorNode.setPeriodicWave') 1326 @DomName('OscillatorNode.setPeriodicWave')
1400 @DocsEditable() 1327 @DocsEditable()
1401 @Experimental() // untriaged 1328 @Experimental() // untriaged
1402 void setPeriodicWave(PeriodicWave periodicWave) => _blink.BlinkOscillatorNode. instance.setPeriodicWave_Callback_1_(unwrap_jso(this), unwrap_jso(periodicWave)) ; 1329 void setPeriodicWave(PeriodicWave periodicWave) => _blink.BlinkOscillatorNode. instance.setPeriodicWave_Callback_1_(unwrap_jso(this), unwrap_jso(periodicWave)) ;
1403 1330
1404 void start([num when]) { 1331 void start([num when]) {
1405 if (when != null) { 1332 if (when != null) {
1406 _blink.BlinkOscillatorNode.instance.start_Callback_1_(unwrap_jso(this), wh en); 1333 _blink.BlinkOscillatorNode.instance.start_Callback_1_(unwrap_jso(this), wh en);
1407 return; 1334 return;
1408 } 1335 }
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1622 1549
1623 } 1550 }
1624 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1551 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1625 // for details. All rights reserved. Use of this source code is governed by a 1552 // for details. All rights reserved. Use of this source code is governed by a
1626 // BSD-style license that can be found in the LICENSE file. 1553 // BSD-style license that can be found in the LICENSE file.
1627 1554
1628 // WARNING: Do not edit - generated code. 1555 // WARNING: Do not edit - generated code.
1629 1556
1630 1557
1631 @DocsEditable() 1558 @DocsEditable()
1632 @DomName('StereoPannerNode')
1633 @Experimental() // untriaged
1634 class StereoPannerNode extends AudioNode {
1635 // To suppress missing implicit constructor warnings.
1636 factory StereoPannerNode._() { throw new UnsupportedError("Not supported"); }
1637
1638
1639 @Deprecated("Internal Use Only")
1640 static StereoPannerNode internalCreateStereoPannerNode() {
1641 return new StereoPannerNode._internalWrap();
1642 }
1643
1644 external factory StereoPannerNode._internalWrap();
1645
1646 @Deprecated("Internal Use Only")
1647 StereoPannerNode.internal_() : super.internal_();
1648
1649
1650 @DomName('StereoPannerNode.pan')
1651 @DocsEditable()
1652 @Experimental() // untriaged
1653 AudioParam get pan => wrap_jso(_blink.BlinkStereoPannerNode.instance.pan_Gette r_(unwrap_jso(this)));
1654
1655 }
1656 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1657 // for details. All rights reserved. Use of this source code is governed by a
1658 // BSD-style license that can be found in the LICENSE file.
1659
1660 // WARNING: Do not edit - generated code.
1661
1662
1663 @DocsEditable()
1664 @DomName('WaveShaperNode') 1559 @DomName('WaveShaperNode')
1665 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Wav eShaperNode 1560 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Wav eShaperNode
1666 @Experimental() 1561 @Experimental()
1667 class WaveShaperNode extends AudioNode { 1562 class WaveShaperNode extends AudioNode {
1668 // To suppress missing implicit constructor warnings. 1563 // To suppress missing implicit constructor warnings.
1669 factory WaveShaperNode._() { throw new UnsupportedError("Not supported"); } 1564 factory WaveShaperNode._() { throw new UnsupportedError("Not supported"); }
1670 1565
1671 1566
1672 @Deprecated("Internal Use Only") 1567 @Deprecated("Internal Use Only")
1673 static WaveShaperNode internalCreateWaveShaperNode() { 1568 static WaveShaperNode internalCreateWaveShaperNode() {
1674 return new WaveShaperNode._internalWrap(); 1569 return new WaveShaperNode._internalWrap();
1675 } 1570 }
1676 1571
1677 external factory WaveShaperNode._internalWrap(); 1572 external factory WaveShaperNode._internalWrap();
1678 1573
1679 @Deprecated("Internal Use Only") 1574 @Deprecated("Internal Use Only")
1680 WaveShaperNode.internal_() : super.internal_(); 1575 WaveShaperNode.internal_() : super.internal_();
1681 1576
1682 1577
1683 @DomName('WaveShaperNode.curve') 1578 @DomName('WaveShaperNode.curve')
1684 @DocsEditable() 1579 @DocsEditable()
1685 Float32List get curve => wrap_jso(_blink.BlinkWaveShaperNode.instance.curve_Ge tter_(unwrap_jso(this))); 1580 Float32List get curve => _blink.BlinkWaveShaperNode.instance.curve_Getter_(unw rap_jso(this));
1686 1581
1687 @DomName('WaveShaperNode.curve') 1582 @DomName('WaveShaperNode.curve')
1688 @DocsEditable() 1583 @DocsEditable()
1689 set curve(Float32List value) => _blink.BlinkWaveShaperNode.instance.curve_Sett er_(unwrap_jso(this), unwrap_jso(value)); 1584 set curve(Float32List value) => _blink.BlinkWaveShaperNode.instance.curve_Sett er_(unwrap_jso(this), unwrap_jso(value));
1690 1585
1691 @DomName('WaveShaperNode.oversample') 1586 @DomName('WaveShaperNode.oversample')
1692 @DocsEditable() 1587 @DocsEditable()
1693 String get oversample => _blink.BlinkWaveShaperNode.instance.oversample_Getter _(unwrap_jso(this)); 1588 String get oversample => _blink.BlinkWaveShaperNode.instance.oversample_Getter _(unwrap_jso(this));
1694 1589
1695 @DomName('WaveShaperNode.oversample') 1590 @DomName('WaveShaperNode.oversample')
1696 @DocsEditable() 1591 @DocsEditable()
1697 set oversample(String value) => _blink.BlinkWaveShaperNode.instance.oversample _Setter_(unwrap_jso(this), value); 1592 set oversample(String value) => _blink.BlinkWaveShaperNode.instance.oversample _Setter_(unwrap_jso(this), value);
1698 1593
1699 } 1594 }
OLDNEW
« no previous file with comments | « sdk/lib/web_audio/dart2js/web_audio_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