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