| OLD | NEW |
| 1 library dart.dom.web_audio; | 1 library dart.dom.web_audio; |
| 2 | 2 |
| 3 import 'dart:async'; | 3 import 'dart:async'; |
| 4 import 'dart:collection'; | 4 import 'dart:collection'; |
| 5 import 'dart:_collection-dev' hide deprecated; | 5 import 'dart:_collection-dev' hide deprecated; |
| 6 import 'dart:html'; | 6 import 'dart:html'; |
| 7 import 'dart:html_common'; | 7 import 'dart:html_common'; |
| 8 import 'dart:typed_data'; | 8 import 'dart:typed_data'; |
| 9 import 'dart:_js_helper' show Creates, JSName, Returns, convertDartClosureToJS; | 9 import 'dart:_js_helper' show Creates, JSName, Returns, convertDartClosureToJS; |
| 10 import 'dart:_foreign_helper' show JS; | 10 import 'dart:_foreign_helper' show JS; |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 _decodeAudioData(audioData, | 350 _decodeAudioData(audioData, |
| 351 (value) { completer.complete(value); }, | 351 (value) { completer.complete(value); }, |
| 352 (error) { completer.completeError(error); }); | 352 (error) { completer.completeError(error); }); |
| 353 return completer.future; | 353 return completer.future; |
| 354 } | 354 } |
| 355 | 355 |
| 356 @DomName('AudioContext.startRendering') | 356 @DomName('AudioContext.startRendering') |
| 357 @DocsEditable() | 357 @DocsEditable() |
| 358 void startRendering() native; | 358 void startRendering() native; |
| 359 | 359 |
| 360 // From EventTarget |
| 361 |
| 362 @JSName('addEventListener') |
| 363 @DomName('AudioContext.addEventListener') |
| 364 @DocsEditable() |
| 365 @Experimental() // untriaged |
| 366 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
| 367 |
| 368 @DomName('AudioContext.dispatchEvent') |
| 369 @DocsEditable() |
| 370 @Experimental() // untriaged |
| 371 bool dispatchEvent(Event event) native; |
| 372 |
| 373 @JSName('removeEventListener') |
| 374 @DomName('AudioContext.removeEventListener') |
| 375 @DocsEditable() |
| 376 @Experimental() // untriaged |
| 377 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; |
| 378 |
| 360 @DomName('AudioContext.oncomplete') | 379 @DomName('AudioContext.oncomplete') |
| 361 @DocsEditable() | 380 @DocsEditable() |
| 362 Stream<Event> get onComplete => completeEvent.forTarget(this); | 381 Stream<Event> get onComplete => completeEvent.forTarget(this); |
| 363 | 382 |
| 364 factory AudioContext() => JS('AudioContext', | 383 factory AudioContext() => JS('AudioContext', |
| 365 'new (window.AudioContext || window.webkitAudioContext)()'); | 384 'new (window.AudioContext || window.webkitAudioContext)()'); |
| 366 | 385 |
| 367 GainNode createGain() { | 386 GainNode createGain() { |
| 368 if (JS('bool', '#.createGain !== undefined', this)) { | 387 if (JS('bool', '#.createGain !== undefined', this)) { |
| 369 return JS('GainNode', '#.createGain()', this); | 388 return JS('GainNode', '#.createGain()', this); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 | 493 |
| 475 @JSName('connect') | 494 @JSName('connect') |
| 476 @DomName('AudioNode.connect') | 495 @DomName('AudioNode.connect') |
| 477 @DocsEditable() | 496 @DocsEditable() |
| 478 void $dom_connect(destination, int output, [int input]) native; | 497 void $dom_connect(destination, int output, [int input]) native; |
| 479 | 498 |
| 480 @DomName('AudioNode.disconnect') | 499 @DomName('AudioNode.disconnect') |
| 481 @DocsEditable() | 500 @DocsEditable() |
| 482 void disconnect(int output) native; | 501 void disconnect(int output) native; |
| 483 | 502 |
| 503 // From EventTarget |
| 504 |
| 505 @JSName('addEventListener') |
| 506 @DomName('AudioNode.addEventListener') |
| 507 @DocsEditable() |
| 508 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
| 509 |
| 510 @DomName('AudioNode.dispatchEvent') |
| 511 @DocsEditable() |
| 512 bool dispatchEvent(Event event) native; |
| 513 |
| 514 @JSName('removeEventListener') |
| 515 @DomName('AudioNode.removeEventListener') |
| 516 @DocsEditable() |
| 517 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; |
| 518 |
| 484 @DomName('AudioNode.connect') | 519 @DomName('AudioNode.connect') |
| 485 void connectNode(AudioNode destination, [int output = 0, int input = 0]) => | 520 void connectNode(AudioNode destination, [int output = 0, int input = 0]) => |
| 486 $dom_connect(destination, output, input); | 521 $dom_connect(destination, output, input); |
| 487 | 522 |
| 488 @DomName('AudioNode.connect') | 523 @DomName('AudioNode.connect') |
| 489 void connectParam(AudioParam destination, [int output = 0]) => | 524 void connectParam(AudioParam destination, [int output = 0]) => |
| 490 $dom_connect(destination, output); | 525 $dom_connect(destination, output); |
| 491 } | 526 } |
| 492 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 527 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 493 // for details. All rights reserved. Use of this source code is governed by a | 528 // for details. All rights reserved. Use of this source code is governed by a |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 factory WaveShaperNode._() { throw new UnsupportedError("Not supported"); } | 1169 factory WaveShaperNode._() { throw new UnsupportedError("Not supported"); } |
| 1135 | 1170 |
| 1136 @DomName('WaveShaperNode.curve') | 1171 @DomName('WaveShaperNode.curve') |
| 1137 @DocsEditable() | 1172 @DocsEditable() |
| 1138 Float32List curve; | 1173 Float32List curve; |
| 1139 | 1174 |
| 1140 @DomName('WaveShaperNode.oversample') | 1175 @DomName('WaveShaperNode.oversample') |
| 1141 @DocsEditable() | 1176 @DocsEditable() |
| 1142 String oversample; | 1177 String oversample; |
| 1143 } | 1178 } |
| OLD | NEW |