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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 num get sampleRate native "AudioContext_sampleRate_Getter"; | 289 num get sampleRate native "AudioContext_sampleRate_Getter"; |
290 | 290 |
291 @DomName('AudioContext.createAnalyser') | 291 @DomName('AudioContext.createAnalyser') |
292 @DocsEditable | 292 @DocsEditable |
293 AnalyserNode createAnalyser() native "AudioContext_createAnalyser_Callback"; | 293 AnalyserNode createAnalyser() native "AudioContext_createAnalyser_Callback"; |
294 | 294 |
295 @DomName('AudioContext.createBiquadFilter') | 295 @DomName('AudioContext.createBiquadFilter') |
296 @DocsEditable | 296 @DocsEditable |
297 BiquadFilterNode createBiquadFilter() native "AudioContext_createBiquadFilter_
Callback"; | 297 BiquadFilterNode createBiquadFilter() native "AudioContext_createBiquadFilter_
Callback"; |
298 | 298 |
299 AudioBuffer createBuffer(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFram
es, [num sampleRate]) { | 299 @DomName('AudioContext.createBuffer') |
300 if ((sampleRate is num || sampleRate == null) && (mixToMono_OR_numberOfFrame
s is int || mixToMono_OR_numberOfFrames == null) && (buffer_OR_numberOfChannels
is int || buffer_OR_numberOfChannels == null)) { | 300 @DocsEditable |
301 return _createBuffer_1(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFr
ames, sampleRate); | 301 AudioBuffer createBuffer(int numberOfChannels, int numberOfFrames, num sampleR
ate) native "AudioContext_createBuffer_Callback"; |
302 } | |
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); | |
305 } | |
306 throw new ArgumentError("Incorrect number or type of arguments"); | |
307 } | |
308 | 302 |
309 AudioBuffer _createBuffer_1(buffer_OR_numberOfChannels, mixToMono_OR_numberOfF
rames, sampleRate) native "AudioContext__createBuffer_1_Callback"; | 303 @DomName('AudioContext.createBufferFromBuffer') |
310 | 304 @DocsEditable |
311 AudioBuffer _createBuffer_2(buffer_OR_numberOfChannels, mixToMono_OR_numberOfF
rames) native "AudioContext__createBuffer_2_Callback"; | 305 AudioBuffer createBufferFromBuffer(ByteBuffer buffer, bool mixToMono) native "
AudioContext_createBufferFromBuffer_Callback"; |
312 | 306 |
313 @DomName('AudioContext.createBufferSource') | 307 @DomName('AudioContext.createBufferSource') |
314 @DocsEditable | 308 @DocsEditable |
315 AudioBufferSourceNode createBufferSource() native "AudioContext_createBufferSo
urce_Callback"; | 309 AudioBufferSourceNode createBufferSource() native "AudioContext_createBufferSo
urce_Callback"; |
316 | 310 |
317 ChannelMergerNode createChannelMerger([int numberOfInputs]) { | 311 ChannelMergerNode createChannelMerger([int numberOfInputs]) { |
318 if (numberOfInputs != null) { | 312 if (numberOfInputs != null) { |
319 return _createChannelMerger_1(numberOfInputs); | 313 return _createChannelMerger_1(numberOfInputs); |
320 } | 314 } |
321 return _createChannelMerger_2(); | 315 return _createChannelMerger_2(); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 | 500 |
507 @DomName('AudioListener.setVelocity') | 501 @DomName('AudioListener.setVelocity') |
508 @DocsEditable | 502 @DocsEditable |
509 void setVelocity(num x, num y, num z) native "AudioListener_setVelocity_Callba
ck"; | 503 void setVelocity(num x, num y, num z) native "AudioListener_setVelocity_Callba
ck"; |
510 | 504 |
511 } | 505 } |
512 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 506 // 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 | 507 // 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. | 508 // BSD-style license that can be found in the LICENSE file. |
515 | 509 |
516 // WARNING: Do not edit - generated code. | |
517 | 510 |
518 | |
519 @DocsEditable | |
520 @DomName('AudioNode') | 511 @DomName('AudioNode') |
521 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioNo
de-section | 512 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioNo
de-section |
522 @Experimental | 513 @Experimental |
523 class AudioNode extends EventTarget { | 514 class AudioNode extends EventTarget { |
524 AudioNode.internal() : super.internal(); | 515 AudioNode.internal() : super.internal(); |
525 | 516 |
526 @DomName('AudioNode.channelCount') | 517 @DomName('AudioNode.channelCount') |
527 @DocsEditable | 518 @DocsEditable |
528 int get channelCount native "AudioNode_channelCount_Getter"; | 519 int get channelCount native "AudioNode_channelCount_Getter"; |
529 | 520 |
(...skipping 26 matching lines...) Expand all Loading... |
556 int get numberOfInputs native "AudioNode_numberOfInputs_Getter"; | 547 int get numberOfInputs native "AudioNode_numberOfInputs_Getter"; |
557 | 548 |
558 @DomName('AudioNode.numberOfOutputs') | 549 @DomName('AudioNode.numberOfOutputs') |
559 @DocsEditable | 550 @DocsEditable |
560 int get numberOfOutputs native "AudioNode_numberOfOutputs_Getter"; | 551 int get numberOfOutputs native "AudioNode_numberOfOutputs_Getter"; |
561 | 552 |
562 @DomName('AudioNode.addEventListener') | 553 @DomName('AudioNode.addEventListener') |
563 @DocsEditable | 554 @DocsEditable |
564 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "AudioNode_addEventListener_Callback"; | 555 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "AudioNode_addEventListener_Callback"; |
565 | 556 |
566 void connect(destination, int output, [int input]) { | 557 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)) { | 558 if ((input is int || input == null) && (output is int || output == null) &&
(destination is AudioNode || destination == null)) { |
568 _connect_1(destination, output, input); | 559 _connect_1(destination, output, input); |
569 return; | 560 return; |
570 } | 561 } |
571 if ((output is int || output == null) && (destination is AudioParam || desti
nation == null) && input == null) { | 562 if ((output is int || output == null) && (destination is AudioParam || desti
nation == null) && input == null) { |
572 _connect_2(destination, output); | 563 _connect_2(destination, output); |
573 return; | 564 return; |
574 } | 565 } |
575 throw new ArgumentError("Incorrect number or type of arguments"); | 566 throw new ArgumentError("Incorrect number or type of arguments"); |
576 } | 567 } |
577 | 568 |
578 void _connect_1(destination, output, input) native "AudioNode__connect_1_Callb
ack"; | 569 void _connect_1(destination, output, input) native "AudioNode__connect_1_Callb
ack"; |
579 | 570 |
580 void _connect_2(destination, output) native "AudioNode__connect_2_Callback"; | 571 void _connect_2(destination, output) native "AudioNode__connect_2_Callback"; |
581 | 572 |
582 @DomName('AudioNode.disconnect') | 573 @DomName('AudioNode.disconnect') |
583 @DocsEditable | 574 @DocsEditable |
584 void disconnect(int output) native "AudioNode_disconnect_Callback"; | 575 void disconnect(int output) native "AudioNode_disconnect_Callback"; |
585 | 576 |
586 @DomName('AudioNode.dispatchEvent') | 577 @DomName('AudioNode.dispatchEvent') |
587 @DocsEditable | 578 @DocsEditable |
588 bool dispatchEvent(Event event) native "AudioNode_dispatchEvent_Callback"; | 579 bool dispatchEvent(Event event) native "AudioNode_dispatchEvent_Callback"; |
589 | 580 |
590 @DomName('AudioNode.removeEventListener') | 581 @DomName('AudioNode.removeEventListener') |
591 @DocsEditable | 582 @DocsEditable |
592 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "AudioNode_removeEventListener_Callback"; | 583 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "AudioNode_removeEventListener_Callback"; |
593 | 584 |
| 585 @DomName('AudioNode.connect') |
| 586 void connectNode(AudioNode destination, [int output = 0, int input = 0]) => |
| 587 $dom_connect(destination, output, input); |
| 588 |
| 589 @DomName('AudioNode.connect') |
| 590 void connectParam(AudioParam destination, [int output = 0]) => |
| 591 $dom_connect(destination, output); |
594 } | 592 } |
595 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 593 // 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 | 594 // 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. | 595 // BSD-style license that can be found in the LICENSE file. |
598 | 596 |
599 // WARNING: Do not edit - generated code. | 597 // WARNING: Do not edit - generated code. |
600 | 598 |
601 | 599 |
602 @DocsEditable | 600 @DocsEditable |
603 @DomName('AudioParam') | 601 @DomName('AudioParam') |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1331 | 1329 |
1332 | 1330 |
1333 @DocsEditable | 1331 @DocsEditable |
1334 @DomName('WaveTable') | 1332 @DomName('WaveTable') |
1335 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#WaveTab
le-section | 1333 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#WaveTab
le-section |
1336 @Experimental | 1334 @Experimental |
1337 class WaveTable extends NativeFieldWrapperClass1 { | 1335 class WaveTable extends NativeFieldWrapperClass1 { |
1338 WaveTable.internal(); | 1336 WaveTable.internal(); |
1339 | 1337 |
1340 } | 1338 } |
OLD | NEW |