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'; | 5 import 'dart:_collection-dev'; |
6 import 'dart:html'; | 6 import 'dart:html'; |
7 import 'dart:html_common'; | 7 import 'dart:html_common'; |
8 import 'dart:nativewrappers'; | 8 import 'dart:nativewrappers'; |
9 import 'dart:typed_data'; | 9 import 'dart:typed_data'; |
10 // DO NOT EDIT | 10 // DO NOT EDIT |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 if ((mixToMono_OR_numberOfFrames is bool || mixToMono_OR_numberOfFrames == n
ull) && (buffer_OR_numberOfChannels is ByteBuffer || buffer_OR_numberOfChannels
== null) && sampleRate == null) { | 303 if ((mixToMono_OR_numberOfFrames is bool || mixToMono_OR_numberOfFrames == n
ull) && (buffer_OR_numberOfChannels is ByteBuffer || buffer_OR_numberOfChannels
== null) && sampleRate == null) { |
304 return _createBuffer_2(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFr
ames); | 304 return _createBuffer_2(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFr
ames); |
305 } | 305 } |
306 throw new ArgumentError("Incorrect number or type of arguments"); | 306 throw new ArgumentError("Incorrect number or type of arguments"); |
307 } | 307 } |
308 | 308 |
309 AudioBuffer _createBuffer_1(buffer_OR_numberOfChannels, mixToMono_OR_numberOfF
rames, sampleRate) native "AudioContext__createBuffer_1_Callback"; | 309 AudioBuffer _createBuffer_1(buffer_OR_numberOfChannels, mixToMono_OR_numberOfF
rames, sampleRate) native "AudioContext__createBuffer_1_Callback"; |
310 | 310 |
311 AudioBuffer _createBuffer_2(buffer_OR_numberOfChannels, mixToMono_OR_numberOfF
rames) native "AudioContext__createBuffer_2_Callback"; | 311 AudioBuffer _createBuffer_2(buffer_OR_numberOfChannels, mixToMono_OR_numberOfF
rames) native "AudioContext__createBuffer_2_Callback"; |
312 | 312 |
| 313 @DomName('AudioContext.createBufferFromBuffer') |
| 314 @DocsEditable |
| 315 AudioBuffer createBufferFromBuffer(ByteBuffer buffer, bool mixToMono) native "
AudioContext_createBufferFromBuffer_Callback"; |
| 316 |
313 @DomName('AudioContext.createBufferSource') | 317 @DomName('AudioContext.createBufferSource') |
314 @DocsEditable | 318 @DocsEditable |
315 AudioBufferSourceNode createBufferSource() native "AudioContext_createBufferSo
urce_Callback"; | 319 AudioBufferSourceNode createBufferSource() native "AudioContext_createBufferSo
urce_Callback"; |
316 | 320 |
317 ChannelMergerNode createChannelMerger([int numberOfInputs]) { | 321 ChannelMergerNode createChannelMerger([int numberOfInputs]) { |
318 if (numberOfInputs != null) { | 322 if (numberOfInputs != null) { |
319 return _createChannelMerger_1(numberOfInputs); | 323 return _createChannelMerger_1(numberOfInputs); |
320 } | 324 } |
321 return _createChannelMerger_2(); | 325 return _createChannelMerger_2(); |
322 } | 326 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 } | 363 } |
360 | 364 |
361 DelayNode _createDelayNode_1(maxDelayTime) native "AudioContext__createDelayNo
de_1_Callback"; | 365 DelayNode _createDelayNode_1(maxDelayTime) native "AudioContext__createDelayNo
de_1_Callback"; |
362 | 366 |
363 DelayNode _createDelayNode_2() native "AudioContext__createDelayNode_2_Callbac
k"; | 367 DelayNode _createDelayNode_2() native "AudioContext__createDelayNode_2_Callbac
k"; |
364 | 368 |
365 @DomName('AudioContext.createDynamicsCompressor') | 369 @DomName('AudioContext.createDynamicsCompressor') |
366 @DocsEditable | 370 @DocsEditable |
367 DynamicsCompressorNode createDynamicsCompressor() native "AudioContext_createD
ynamicsCompressor_Callback"; | 371 DynamicsCompressorNode createDynamicsCompressor() native "AudioContext_createD
ynamicsCompressor_Callback"; |
368 | 372 |
| 373 @DomName('AudioContext.createEmptyBuffer') |
| 374 @DocsEditable |
| 375 AudioBuffer createEmptyBuffer(int numberOfChannels, int numberOfFrames, num sa
mpleRate) native "AudioContext_createEmptyBuffer_Callback"; |
| 376 |
369 @DomName('AudioContext.createGain') | 377 @DomName('AudioContext.createGain') |
370 @DocsEditable | 378 @DocsEditable |
371 GainNode createGain() native "AudioContext_createGain_Callback"; | 379 GainNode createGain() native "AudioContext_createGain_Callback"; |
372 | 380 |
373 @DomName('AudioContext.createGainNode') | 381 @DomName('AudioContext.createGainNode') |
374 @DocsEditable | 382 @DocsEditable |
375 GainNode createGainNode() native "AudioContext_createGainNode_Callback"; | 383 GainNode createGainNode() native "AudioContext_createGainNode_Callback"; |
376 | 384 |
377 ScriptProcessorNode createJavaScriptNode(int bufferSize, [int numberOfInputCha
nnels, int numberOfOutputChannels]) { | 385 ScriptProcessorNode createJavaScriptNode(int bufferSize, [int numberOfInputCha
nnels, int numberOfOutputChannels]) { |
378 if (numberOfOutputChannels != null) { | 386 if (numberOfOutputChannels != null) { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 | 514 |
507 @DomName('AudioListener.setVelocity') | 515 @DomName('AudioListener.setVelocity') |
508 @DocsEditable | 516 @DocsEditable |
509 void setVelocity(num x, num y, num z) native "AudioListener_setVelocity_Callba
ck"; | 517 void setVelocity(num x, num y, num z) native "AudioListener_setVelocity_Callba
ck"; |
510 | 518 |
511 } | 519 } |
512 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 520 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
513 // for details. All rights reserved. Use of this source code is governed by a | 521 // for details. All rights reserved. Use of this source code is governed by a |
514 // BSD-style license that can be found in the LICENSE file. | 522 // BSD-style license that can be found in the LICENSE file. |
515 | 523 |
516 // WARNING: Do not edit - generated code. | |
517 | 524 |
518 | |
519 @DocsEditable | |
520 @DomName('AudioNode') | 525 @DomName('AudioNode') |
521 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioNo
de-section | 526 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioNo
de-section |
522 @Experimental | 527 @Experimental |
523 class AudioNode extends EventTarget { | 528 class AudioNode extends EventTarget { |
524 AudioNode.internal() : super.internal(); | 529 AudioNode.internal() : super.internal(); |
525 | 530 |
526 @DomName('AudioNode.channelCount') | 531 @DomName('AudioNode.channelCount') |
527 @DocsEditable | 532 @DocsEditable |
528 int get channelCount native "AudioNode_channelCount_Getter"; | 533 int get channelCount native "AudioNode_channelCount_Getter"; |
529 | 534 |
(...skipping 26 matching lines...) Expand all Loading... |
556 int get numberOfInputs native "AudioNode_numberOfInputs_Getter"; | 561 int get numberOfInputs native "AudioNode_numberOfInputs_Getter"; |
557 | 562 |
558 @DomName('AudioNode.numberOfOutputs') | 563 @DomName('AudioNode.numberOfOutputs') |
559 @DocsEditable | 564 @DocsEditable |
560 int get numberOfOutputs native "AudioNode_numberOfOutputs_Getter"; | 565 int get numberOfOutputs native "AudioNode_numberOfOutputs_Getter"; |
561 | 566 |
562 @DomName('AudioNode.addEventListener') | 567 @DomName('AudioNode.addEventListener') |
563 @DocsEditable | 568 @DocsEditable |
564 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "AudioNode_addEventListener_Callback"; | 569 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "AudioNode_addEventListener_Callback"; |
565 | 570 |
566 void connect(destination, int output, [int input]) { | 571 void $dom_connect(destination, int output, [int input]) { |
567 if ((input is int || input == null) && (output is int || output == null) &&
(destination is AudioNode || destination == null)) { | 572 if ((input is int || input == null) && (output is int || output == null) &&
(destination is AudioNode || destination == null)) { |
568 _connect_1(destination, output, input); | 573 _connect_1(destination, output, input); |
569 return; | 574 return; |
570 } | 575 } |
571 if ((output is int || output == null) && (destination is AudioParam || desti
nation == null) && input == null) { | 576 if ((output is int || output == null) && (destination is AudioParam || desti
nation == null) && input == null) { |
572 _connect_2(destination, output); | 577 _connect_2(destination, output); |
573 return; | 578 return; |
574 } | 579 } |
575 throw new ArgumentError("Incorrect number or type of arguments"); | 580 throw new ArgumentError("Incorrect number or type of arguments"); |
576 } | 581 } |
577 | 582 |
578 void _connect_1(destination, output, input) native "AudioNode__connect_1_Callb
ack"; | 583 void _connect_1(destination, output, input) native "AudioNode__connect_1_Callb
ack"; |
579 | 584 |
580 void _connect_2(destination, output) native "AudioNode__connect_2_Callback"; | 585 void _connect_2(destination, output) native "AudioNode__connect_2_Callback"; |
581 | 586 |
582 @DomName('AudioNode.disconnect') | 587 @DomName('AudioNode.disconnect') |
583 @DocsEditable | 588 @DocsEditable |
584 void disconnect(int output) native "AudioNode_disconnect_Callback"; | 589 void disconnect(int output) native "AudioNode_disconnect_Callback"; |
585 | 590 |
586 @DomName('AudioNode.dispatchEvent') | 591 @DomName('AudioNode.dispatchEvent') |
587 @DocsEditable | 592 @DocsEditable |
588 bool dispatchEvent(Event event) native "AudioNode_dispatchEvent_Callback"; | 593 bool dispatchEvent(Event event) native "AudioNode_dispatchEvent_Callback"; |
589 | 594 |
590 @DomName('AudioNode.removeEventListener') | 595 @DomName('AudioNode.removeEventListener') |
591 @DocsEditable | 596 @DocsEditable |
592 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "AudioNode_removeEventListener_Callback"; | 597 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "AudioNode_removeEventListener_Callback"; |
593 | 598 |
| 599 @DomName('AudioNode.connect') |
| 600 void connectNode(AudioNode destination, [int output = 0, int input = 0]) => |
| 601 $dom_connect(destination, output, input); |
| 602 |
| 603 @DomName('AudioNode.connect') |
| 604 void connectParam(AudioParam destination, [int output = 0]) => |
| 605 $dom_connect(destination, output); |
594 } | 606 } |
595 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 607 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
596 // for details. All rights reserved. Use of this source code is governed by a | 608 // for details. All rights reserved. Use of this source code is governed by a |
597 // BSD-style license that can be found in the LICENSE file. | 609 // BSD-style license that can be found in the LICENSE file. |
598 | 610 |
599 // WARNING: Do not edit - generated code. | 611 // WARNING: Do not edit - generated code. |
600 | 612 |
601 | 613 |
602 @DocsEditable | 614 @DocsEditable |
603 @DomName('AudioParam') | 615 @DomName('AudioParam') |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1331 | 1343 |
1332 | 1344 |
1333 @DocsEditable | 1345 @DocsEditable |
1334 @DomName('WaveTable') | 1346 @DomName('WaveTable') |
1335 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#WaveTab
le-section | 1347 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#WaveTab
le-section |
1336 @Experimental | 1348 @Experimental |
1337 class WaveTable extends NativeFieldWrapperClass1 { | 1349 class WaveTable extends NativeFieldWrapperClass1 { |
1338 WaveTable.internal(); | 1350 WaveTable.internal(); |
1339 | 1351 |
1340 } | 1352 } |
OLD | NEW |