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: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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 AnalyserNode createAnalyser() native; | 244 AnalyserNode createAnalyser() native; |
245 | 245 |
246 @DomName('AudioContext.createBiquadFilter') | 246 @DomName('AudioContext.createBiquadFilter') |
247 @DocsEditable | 247 @DocsEditable |
248 BiquadFilterNode createBiquadFilter() native; | 248 BiquadFilterNode createBiquadFilter() native; |
249 | 249 |
250 @DomName('AudioContext.createBuffer') | 250 @DomName('AudioContext.createBuffer') |
251 @DocsEditable | 251 @DocsEditable |
252 AudioBuffer createBuffer(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFram
es, [num sampleRate]) native; | 252 AudioBuffer createBuffer(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFram
es, [num sampleRate]) native; |
253 | 253 |
| 254 @JSName('createBuffer') |
| 255 @DomName('AudioContext.createBuffer') |
| 256 @DocsEditable |
| 257 AudioBuffer createBufferFromBuffer(ByteBuffer buffer, bool mixToMono) native; |
| 258 |
254 @DomName('AudioContext.createBufferSource') | 259 @DomName('AudioContext.createBufferSource') |
255 @DocsEditable | 260 @DocsEditable |
256 AudioBufferSourceNode createBufferSource() native; | 261 AudioBufferSourceNode createBufferSource() native; |
257 | 262 |
258 @DomName('AudioContext.createChannelMerger') | 263 @DomName('AudioContext.createChannelMerger') |
259 @DocsEditable | 264 @DocsEditable |
260 ChannelMergerNode createChannelMerger([int numberOfInputs]) native; | 265 ChannelMergerNode createChannelMerger([int numberOfInputs]) native; |
261 | 266 |
262 @DomName('AudioContext.createChannelSplitter') | 267 @DomName('AudioContext.createChannelSplitter') |
263 @DocsEditable | 268 @DocsEditable |
264 ChannelSplitterNode createChannelSplitter([int numberOfOutputs]) native; | 269 ChannelSplitterNode createChannelSplitter([int numberOfOutputs]) native; |
265 | 270 |
266 @DomName('AudioContext.createConvolver') | 271 @DomName('AudioContext.createConvolver') |
267 @DocsEditable | 272 @DocsEditable |
268 ConvolverNode createConvolver() native; | 273 ConvolverNode createConvolver() native; |
269 | 274 |
270 @DomName('AudioContext.createDelay') | 275 @DomName('AudioContext.createDelay') |
271 @DocsEditable | 276 @DocsEditable |
272 DelayNode createDelay([num maxDelayTime]) native; | 277 DelayNode createDelay([num maxDelayTime]) native; |
273 | 278 |
274 @DomName('AudioContext.createDelayNode') | 279 @DomName('AudioContext.createDelayNode') |
275 @DocsEditable | 280 @DocsEditable |
276 DelayNode createDelayNode([num maxDelayTime]) native; | 281 DelayNode createDelayNode([num maxDelayTime]) native; |
277 | 282 |
278 @DomName('AudioContext.createDynamicsCompressor') | 283 @DomName('AudioContext.createDynamicsCompressor') |
279 @DocsEditable | 284 @DocsEditable |
280 DynamicsCompressorNode createDynamicsCompressor() native; | 285 DynamicsCompressorNode createDynamicsCompressor() native; |
281 | 286 |
| 287 @JSName('createBuffer') |
| 288 @DomName('AudioContext.createBuffer') |
| 289 @DocsEditable |
| 290 AudioBuffer createEmptyBuffer(int numberOfChannels, int numberOfFrames, num sa
mpleRate) native; |
| 291 |
282 @DomName('AudioContext.createGainNode') | 292 @DomName('AudioContext.createGainNode') |
283 @DocsEditable | 293 @DocsEditable |
284 GainNode createGainNode() native; | 294 GainNode createGainNode() native; |
285 | 295 |
286 @DomName('AudioContext.createJavaScriptNode') | 296 @DomName('AudioContext.createJavaScriptNode') |
287 @DocsEditable | 297 @DocsEditable |
288 ScriptProcessorNode createJavaScriptNode(int bufferSize, [int numberOfInputCha
nnels, int numberOfOutputChannels]) native; | 298 ScriptProcessorNode createJavaScriptNode(int bufferSize, [int numberOfInputCha
nnels, int numberOfOutputChannels]) native; |
289 | 299 |
290 @DomName('AudioContext.createMediaElementSource') | 300 @DomName('AudioContext.createMediaElementSource') |
291 @DocsEditable | 301 @DocsEditable |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 | 408 |
399 @DomName('AudioListener.setVelocity') | 409 @DomName('AudioListener.setVelocity') |
400 @DocsEditable | 410 @DocsEditable |
401 void setVelocity(num x, num y, num z) native; | 411 void setVelocity(num x, num y, num z) native; |
402 } | 412 } |
403 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 413 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
404 // for details. All rights reserved. Use of this source code is governed by a | 414 // for details. All rights reserved. Use of this source code is governed by a |
405 // BSD-style license that can be found in the LICENSE file. | 415 // BSD-style license that can be found in the LICENSE file. |
406 | 416 |
407 | 417 |
408 @DocsEditable | |
409 @DomName('AudioNode') | 418 @DomName('AudioNode') |
410 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioNo
de-section | 419 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioNo
de-section |
411 @Experimental | 420 @Experimental |
412 class AudioNode extends EventTarget native "AudioNode" { | 421 class AudioNode extends EventTarget native "AudioNode" { |
413 | 422 |
414 @DomName('AudioNode.channelCount') | 423 @DomName('AudioNode.channelCount') |
415 @DocsEditable | 424 @DocsEditable |
416 int channelCount; | 425 int channelCount; |
417 | 426 |
418 @DomName('AudioNode.channelCountMode') | 427 @DomName('AudioNode.channelCountMode') |
(...skipping 14 matching lines...) Expand all Loading... |
433 | 442 |
434 @DomName('AudioNode.numberOfOutputs') | 443 @DomName('AudioNode.numberOfOutputs') |
435 @DocsEditable | 444 @DocsEditable |
436 final int numberOfOutputs; | 445 final int numberOfOutputs; |
437 | 446 |
438 @JSName('addEventListener') | 447 @JSName('addEventListener') |
439 @DomName('AudioNode.addEventListener') | 448 @DomName('AudioNode.addEventListener') |
440 @DocsEditable | 449 @DocsEditable |
441 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | 450 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
442 | 451 |
| 452 @JSName('connect') |
443 @DomName('AudioNode.connect') | 453 @DomName('AudioNode.connect') |
444 @DocsEditable | 454 @DocsEditable |
445 void connect(destination, int output, [int input]) native; | 455 void $dom_connect(destination, int output, [int input]) native; |
446 | 456 |
447 @DomName('AudioNode.disconnect') | 457 @DomName('AudioNode.disconnect') |
448 @DocsEditable | 458 @DocsEditable |
449 void disconnect(int output) native; | 459 void disconnect(int output) native; |
450 | 460 |
451 @DomName('AudioNode.dispatchEvent') | 461 @DomName('AudioNode.dispatchEvent') |
452 @DocsEditable | 462 @DocsEditable |
453 bool dispatchEvent(Event event) native; | 463 bool dispatchEvent(Event event) native; |
454 | 464 |
455 @JSName('removeEventListener') | 465 @JSName('removeEventListener') |
456 @DomName('AudioNode.removeEventListener') | 466 @DomName('AudioNode.removeEventListener') |
457 @DocsEditable | 467 @DocsEditable |
458 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; | 468 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; |
| 469 |
| 470 @DomName('AudioNode.connect') |
| 471 void connectNode(AudioNode destination, [int output = 0, int input = 0]) => |
| 472 $dom_connect(destination, output, input); |
| 473 |
| 474 @DomName('AudioNode.connect') |
| 475 void connectParam(AudioParam destination, [int output = 0]) => |
| 476 $dom_connect(destination, output); |
459 } | 477 } |
460 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 478 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
461 // for details. All rights reserved. Use of this source code is governed by a | 479 // for details. All rights reserved. Use of this source code is governed by a |
462 // BSD-style license that can be found in the LICENSE file. | 480 // BSD-style license that can be found in the LICENSE file. |
463 | 481 |
464 | 482 |
465 @DocsEditable | 483 @DocsEditable |
466 @DomName('AudioParam') | 484 @DomName('AudioParam') |
467 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPa
ram | 485 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPa
ram |
468 @Experimental | 486 @Experimental |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 // for details. All rights reserved. Use of this source code is governed by a | 1074 // for details. All rights reserved. Use of this source code is governed by a |
1057 // BSD-style license that can be found in the LICENSE file. | 1075 // BSD-style license that can be found in the LICENSE file. |
1058 | 1076 |
1059 | 1077 |
1060 @DocsEditable | 1078 @DocsEditable |
1061 @DomName('WaveTable') | 1079 @DomName('WaveTable') |
1062 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#WaveTab
le-section | 1080 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#WaveTab
le-section |
1063 @Experimental | 1081 @Experimental |
1064 class WaveTable native "WaveTable" { | 1082 class WaveTable native "WaveTable" { |
1065 } | 1083 } |
OLD | NEW |