OLD | NEW |
1 /** | 1 /** |
2 * High-fidelity audio programming in the browser. | 2 * High-fidelity audio programming in the browser. |
3 */ | 3 */ |
4 library dart.dom.web_audio; | 4 library dart.dom.web_audio; |
5 | 5 |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'dart:_internal'; | 8 import 'dart:_internal'; |
9 import 'dart:html'; | 9 import 'dart:html'; |
10 import 'dart:html_common'; | 10 import 'dart:html_common'; |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 | 354 |
355 @DomName('AudioContext.createStereoPanner') | 355 @DomName('AudioContext.createStereoPanner') |
356 @DocsEditable() | 356 @DocsEditable() |
357 @Experimental() // untriaged | 357 @Experimental() // untriaged |
358 StereoPannerNode createStereoPanner() native; | 358 StereoPannerNode createStereoPanner() native; |
359 | 359 |
360 @DomName('AudioContext.createWaveShaper') | 360 @DomName('AudioContext.createWaveShaper') |
361 @DocsEditable() | 361 @DocsEditable() |
362 WaveShaperNode createWaveShaper() native; | 362 WaveShaperNode createWaveShaper() native; |
363 | 363 |
364 @JSName('decodeAudioData') | |
365 @DomName('AudioContext.decodeAudioData') | |
366 @DocsEditable() | |
367 Future _decodeAudioData(ByteBuffer audioData, | |
368 [AudioBufferCallback successCallback, | |
369 AudioBufferCallback errorCallback]) native; | |
370 | |
371 @DomName('AudioContext.resume') | 364 @DomName('AudioContext.resume') |
372 @DocsEditable() | 365 @DocsEditable() |
373 @Experimental() // untriaged | 366 @Experimental() // untriaged |
374 Future resume() native; | 367 Future resume() native; |
375 | 368 |
376 @DomName('AudioContext.suspend') | 369 @DomName('AudioContext.suspend') |
377 @DocsEditable() | 370 @DocsEditable() |
378 @Experimental() // untriaged | 371 @Experimental() // untriaged |
379 Future suspend() native; | 372 Future suspend() native; |
380 | 373 |
(...skipping 21 matching lines...) Expand all Loading... |
402 bufferSize, numberOfInputChannels, numberOfOutputChannels); | 395 bufferSize, numberOfInputChannels, numberOfOutputChannels); |
403 } else if (numberOfInputChannels != null) { | 396 } else if (numberOfInputChannels != null) { |
404 return JS('ScriptProcessorNode', '#.call(#, #, #)', function, this, | 397 return JS('ScriptProcessorNode', '#.call(#, #, #)', function, this, |
405 bufferSize, numberOfInputChannels); | 398 bufferSize, numberOfInputChannels); |
406 } else { | 399 } else { |
407 return JS( | 400 return JS( |
408 'ScriptProcessorNode', '#.call(#, #)', function, this, bufferSize); | 401 'ScriptProcessorNode', '#.call(#, #)', function, this, bufferSize); |
409 } | 402 } |
410 } | 403 } |
411 | 404 |
| 405 @JSName('decodeAudioData') |
| 406 @DomName('AudioContext.decodeAudioData') |
| 407 @DocsEditable() |
| 408 Future _decodeAudioData(ByteBuffer audioData, |
| 409 [AudioBufferCallback successCallback, |
| 410 AudioBufferCallback errorCallback]) native; |
| 411 |
412 @DomName('AudioContext.decodeAudioData') | 412 @DomName('AudioContext.decodeAudioData') |
413 Future<AudioBuffer> decodeAudioData(ByteBuffer audioData) { | 413 Future<AudioBuffer> decodeAudioData(ByteBuffer audioData) { |
414 var completer = new Completer<AudioBuffer>(); | 414 var completer = new Completer<AudioBuffer>(); |
415 _decodeAudioData(audioData, (value) { | 415 _decodeAudioData(audioData, (value) { |
416 completer.complete(value); | 416 completer.complete(value); |
417 }, (error) { | 417 }, (error) { |
418 if (error == null) { | 418 if (error == null) { |
419 completer.completeError(''); | 419 completer.completeError(''); |
420 } else { | 420 } else { |
421 completer.completeError(error); | 421 completer.completeError(error); |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 } | 1147 } |
1148 | 1148 |
1149 @DomName('WaveShaperNode.curve') | 1149 @DomName('WaveShaperNode.curve') |
1150 @DocsEditable() | 1150 @DocsEditable() |
1151 Float32List curve; | 1151 Float32List curve; |
1152 | 1152 |
1153 @DomName('WaveShaperNode.oversample') | 1153 @DomName('WaveShaperNode.oversample') |
1154 @DocsEditable() | 1154 @DocsEditable() |
1155 String oversample; | 1155 String oversample; |
1156 } | 1156 } |
OLD | NEW |