Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: pkg/dev_compiler/tool/input_sdk/lib/web_audio/dart2js/web_audio_dart2js.dart

Issue 2899083007: Update DDC html libraries to match SDK (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 final int length; 94 final int length;
95 95
96 @DomName('AudioBuffer.numberOfChannels') 96 @DomName('AudioBuffer.numberOfChannels')
97 @DocsEditable() 97 @DocsEditable()
98 final int numberOfChannels; 98 final int numberOfChannels;
99 99
100 @DomName('AudioBuffer.sampleRate') 100 @DomName('AudioBuffer.sampleRate')
101 @DocsEditable() 101 @DocsEditable()
102 final double sampleRate; 102 final double sampleRate;
103 103
104 @DomName('AudioBuffer.copyFromChannel')
105 @DocsEditable()
106 @Experimental() // untriaged
107 void copyFromChannel(Float32List destination, int channelNumber,
108 [int startInChannel]) native;
109
110 @DomName('AudioBuffer.copyToChannel')
111 @DocsEditable()
112 @Experimental() // untriaged
113 void copyToChannel(Float32List source, int channelNumber,
114 [int startInChannel]) native;
115
104 @DomName('AudioBuffer.getChannelData') 116 @DomName('AudioBuffer.getChannelData')
105 @DocsEditable() 117 @DocsEditable()
106 Float32List getChannelData(int channelIndex) native; 118 Float32List getChannelData(int channelIndex) native;
107 } 119 }
108 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 120 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
109 // for details. All rights reserved. Use of this source code is governed by a 121 // for details. All rights reserved. Use of this source code is governed by a
110 // BSD-style license that can be found in the LICENSE file. 122 // BSD-style license that can be found in the LICENSE file.
111 123
112 // WARNING: Do not edit - generated code. 124 // WARNING: Do not edit - generated code.
113 125
114 @DomName('AudioBufferCallback') 126 @DomName('AudioBufferCallback')
115 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu ffer-section 127 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu ffer-section
116 @Experimental() 128 @Experimental()
117 typedef void AudioBufferCallback(AudioBuffer audioBuffer); 129 typedef void AudioBufferCallback(audioBuffer_OR_exception);
118 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 130 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
119 // for details. All rights reserved. Use of this source code is governed by a 131 // for details. All rights reserved. Use of this source code is governed by a
120 // BSD-style license that can be found in the LICENSE file. 132 // BSD-style license that can be found in the LICENSE file.
121 133
122 @DomName('AudioBufferSourceNode') 134 @DomName('AudioBufferSourceNode')
123 @SupportedBrowser(SupportedBrowser.CHROME) 135 @SupportedBrowser(SupportedBrowser.CHROME)
124 @SupportedBrowser(SupportedBrowser.FIREFOX) 136 @SupportedBrowser(SupportedBrowser.FIREFOX)
125 @Experimental() 137 @Experimental()
126 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu fferSourceNode-section 138 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu fferSourceNode-section
127 @Native("AudioBufferSourceNode") 139 @Native("AudioBufferSourceNode")
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 @DomName('AudioBufferSourceNode.endedEvent') 182 @DomName('AudioBufferSourceNode.endedEvent')
171 @DocsEditable() 183 @DocsEditable()
172 @Experimental() // untriaged 184 @Experimental() // untriaged
173 static const EventStreamProvider<Event> endedEvent = 185 static const EventStreamProvider<Event> endedEvent =
174 const EventStreamProvider<Event>('ended'); 186 const EventStreamProvider<Event>('ended');
175 187
176 @DomName('AudioBufferSourceNode.buffer') 188 @DomName('AudioBufferSourceNode.buffer')
177 @DocsEditable() 189 @DocsEditable()
178 AudioBuffer buffer; 190 AudioBuffer buffer;
179 191
192 @DomName('AudioBufferSourceNode.detune')
193 @DocsEditable()
194 @Experimental() // untriaged
195 final AudioParam detune;
196
180 @DomName('AudioBufferSourceNode.loop') 197 @DomName('AudioBufferSourceNode.loop')
181 @DocsEditable() 198 @DocsEditable()
182 bool loop; 199 bool loop;
183 200
184 @DomName('AudioBufferSourceNode.loopEnd') 201 @DomName('AudioBufferSourceNode.loopEnd')
185 @DocsEditable() 202 @DocsEditable()
186 num loopEnd; 203 num loopEnd;
187 204
188 @DomName('AudioBufferSourceNode.loopStart') 205 @DomName('AudioBufferSourceNode.loopStart')
189 @DocsEditable() 206 @DocsEditable()
(...skipping 18 matching lines...) Expand all
208 @SupportedBrowser(SupportedBrowser.FIREFOX) 225 @SupportedBrowser(SupportedBrowser.FIREFOX)
209 @Experimental() 226 @Experimental()
210 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioCo ntext-section 227 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioCo ntext-section
211 @Native("AudioContext,webkitAudioContext") 228 @Native("AudioContext,webkitAudioContext")
212 class AudioContext extends EventTarget { 229 class AudioContext extends EventTarget {
213 // To suppress missing implicit constructor warnings. 230 // To suppress missing implicit constructor warnings.
214 factory AudioContext._() { 231 factory AudioContext._() {
215 throw new UnsupportedError("Not supported"); 232 throw new UnsupportedError("Not supported");
216 } 233 }
217 234
218 /**
219 * Static factory designed to expose `complete` events to event
220 * handlers that are not necessarily instances of [AudioContext].
221 *
222 * See [EventStreamProvider] for usage information.
223 */
224 @DomName('AudioContext.completeEvent')
225 @DocsEditable()
226 static const EventStreamProvider<Event> completeEvent =
227 const EventStreamProvider<Event>('complete');
228
229 /// Checks if this type is supported on the current platform. 235 /// Checks if this type is supported on the current platform.
230 static bool get supported => 236 static bool get supported =>
231 JS('bool', '!!(window.AudioContext || window.webkitAudioContext)'); 237 JS('bool', '!!(window.AudioContext || window.webkitAudioContext)');
232 238
233 @DomName('AudioContext.currentTime') 239 @DomName('AudioContext.currentTime')
234 @DocsEditable() 240 @DocsEditable()
235 final double currentTime; 241 final double currentTime;
236 242
237 @DomName('AudioContext.destination') 243 @DomName('AudioContext.destination')
238 @DocsEditable() 244 @DocsEditable()
239 final AudioDestinationNode destination; 245 final AudioDestinationNode destination;
240 246
241 @DomName('AudioContext.listener') 247 @DomName('AudioContext.listener')
242 @DocsEditable() 248 @DocsEditable()
243 final AudioListener listener; 249 final AudioListener listener;
244 250
245 @DomName('AudioContext.sampleRate') 251 @DomName('AudioContext.sampleRate')
246 @DocsEditable() 252 @DocsEditable()
247 final double sampleRate; 253 final double sampleRate;
248 254
255 @DomName('AudioContext.state')
256 @DocsEditable()
257 @Experimental() // untriaged
258 final String state;
259
260 @DomName('AudioContext.close')
261 @DocsEditable()
262 @Experimental() // untriaged
263 Future close() native;
264
249 @DomName('AudioContext.createAnalyser') 265 @DomName('AudioContext.createAnalyser')
250 @DocsEditable() 266 @DocsEditable()
251 AnalyserNode createAnalyser() native; 267 AnalyserNode createAnalyser() native;
252 268
253 @DomName('AudioContext.createBiquadFilter') 269 @DomName('AudioContext.createBiquadFilter')
254 @DocsEditable() 270 @DocsEditable()
255 BiquadFilterNode createBiquadFilter() native; 271 BiquadFilterNode createBiquadFilter() native;
256 272
257 @DomName('AudioContext.createBuffer') 273 @DomName('AudioContext.createBuffer')
258 @DocsEditable() 274 @DocsEditable()
(...skipping 17 matching lines...) Expand all
276 ConvolverNode createConvolver() native; 292 ConvolverNode createConvolver() native;
277 293
278 @DomName('AudioContext.createDelay') 294 @DomName('AudioContext.createDelay')
279 @DocsEditable() 295 @DocsEditable()
280 DelayNode createDelay([num maxDelayTime]) native; 296 DelayNode createDelay([num maxDelayTime]) native;
281 297
282 @DomName('AudioContext.createDynamicsCompressor') 298 @DomName('AudioContext.createDynamicsCompressor')
283 @DocsEditable() 299 @DocsEditable()
284 DynamicsCompressorNode createDynamicsCompressor() native; 300 DynamicsCompressorNode createDynamicsCompressor() native;
285 301
302 @JSName('createIIRFilter')
303 @DomName('AudioContext.createIIRFilter')
304 @DocsEditable()
305 @Experimental() // untriaged
306 IirFilterNode createIirFilter(List<num> feedForward, List<num> feedBack)
307 native;
308
286 @DomName('AudioContext.createMediaElementSource') 309 @DomName('AudioContext.createMediaElementSource')
287 @DocsEditable() 310 @DocsEditable()
288 MediaElementAudioSourceNode createMediaElementSource( 311 MediaElementAudioSourceNode createMediaElementSource(
289 MediaElement mediaElement) native; 312 MediaElement mediaElement) native;
290 313
291 @DomName('AudioContext.createMediaStreamDestination') 314 @DomName('AudioContext.createMediaStreamDestination')
292 @DocsEditable() 315 @DocsEditable()
293 MediaStreamAudioDestinationNode createMediaStreamDestination() native; 316 MediaStreamAudioDestinationNode createMediaStreamDestination() native;
294 317
295 @DomName('AudioContext.createMediaStreamSource') 318 @DomName('AudioContext.createMediaStreamSource')
296 @DocsEditable() 319 @DocsEditable()
297 MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream) 320 MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream)
298 native; 321 native;
299 322
300 @DomName('AudioContext.createOscillator') 323 @DomName('AudioContext.createOscillator')
301 @DocsEditable() 324 @DocsEditable()
302 OscillatorNode createOscillator() native; 325 OscillatorNode createOscillator() native;
303 326
304 @DomName('AudioContext.createPanner') 327 @DomName('AudioContext.createPanner')
305 @DocsEditable() 328 @DocsEditable()
306 PannerNode createPanner() native; 329 PannerNode createPanner() native;
307 330
308 @DomName('AudioContext.createPeriodicWave') 331 @DomName('AudioContext.createPeriodicWave')
309 @DocsEditable() 332 @DocsEditable()
310 @Experimental() // untriaged 333 @Experimental() // untriaged
311 PeriodicWave createPeriodicWave(Float32List real, Float32List imag) native; 334 PeriodicWave createPeriodicWave(Float32List real, Float32List imag,
335 [Map options]) {
336 if (options != null) {
337 var options_1 = convertDartToNative_Dictionary(options);
338 return _createPeriodicWave_1(real, imag, options_1);
339 }
340 return _createPeriodicWave_2(real, imag);
341 }
342
343 @JSName('createPeriodicWave')
344 @DomName('AudioContext.createPeriodicWave')
345 @DocsEditable()
346 @Experimental() // untriaged
347 PeriodicWave _createPeriodicWave_1(
348 Float32List real, Float32List imag, options) native;
349 @JSName('createPeriodicWave')
350 @DomName('AudioContext.createPeriodicWave')
351 @DocsEditable()
352 @Experimental() // untriaged
353 PeriodicWave _createPeriodicWave_2(Float32List real, Float32List imag) native;
354
355 @DomName('AudioContext.createStereoPanner')
356 @DocsEditable()
357 @Experimental() // untriaged
358 StereoPannerNode createStereoPanner() native;
312 359
313 @DomName('AudioContext.createWaveShaper') 360 @DomName('AudioContext.createWaveShaper')
314 @DocsEditable() 361 @DocsEditable()
315 WaveShaperNode createWaveShaper() native; 362 WaveShaperNode createWaveShaper() native;
316 363
317 @JSName('decodeAudioData') 364 @JSName('decodeAudioData')
318 @DomName('AudioContext.decodeAudioData') 365 @DomName('AudioContext.decodeAudioData')
319 @DocsEditable() 366 @DocsEditable()
320 void _decodeAudioData( 367 Future _decodeAudioData(ByteBuffer audioData,
321 ByteBuffer audioData, AudioBufferCallback successCallback, 368 [AudioBufferCallback successCallback,
322 [AudioBufferCallback errorCallback]) native; 369 AudioBufferCallback errorCallback]) native;
323 370
324 @DomName('AudioContext.startRendering') 371 @DomName('AudioContext.resume')
325 @DocsEditable() 372 @DocsEditable()
326 void startRendering() native; 373 @Experimental() // untriaged
374 Future resume() native;
327 375
328 /// Stream of `complete` events handled by this [AudioContext]. 376 @DomName('AudioContext.suspend')
329 @DomName('AudioContext.oncomplete')
330 @DocsEditable() 377 @DocsEditable()
331 Stream<Event> get onComplete => completeEvent.forTarget(this); 378 @Experimental() // untriaged
379 Future suspend() native;
332 380
333 factory AudioContext() => JS('AudioContext', 381 factory AudioContext() => JS('AudioContext',
334 'new (window.AudioContext || window.webkitAudioContext)()'); 382 'new (window.AudioContext || window.webkitAudioContext)()');
335 383
336 GainNode createGain() { 384 GainNode createGain() {
337 if (JS('bool', '#.createGain !== undefined', this)) { 385 if (JS('bool', '#.createGain !== undefined', this)) {
338 return JS('GainNode', '#.createGain()', this); 386 return JS('GainNode', '#.createGain()', this);
339 } else { 387 } else {
340 return JS('GainNode', '#.createGainNode()', this); 388 return JS('GainNode', '#.createGainNode()', this);
341 } 389 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 @DocsEditable() 512 @DocsEditable()
465 final int numberOfInputs; 513 final int numberOfInputs;
466 514
467 @DomName('AudioNode.numberOfOutputs') 515 @DomName('AudioNode.numberOfOutputs')
468 @DocsEditable() 516 @DocsEditable()
469 final int numberOfOutputs; 517 final int numberOfOutputs;
470 518
471 @JSName('connect') 519 @JSName('connect')
472 @DomName('AudioNode.connect') 520 @DomName('AudioNode.connect')
473 @DocsEditable() 521 @DocsEditable()
474 void _connect(destination, int output, [int input]) native; 522 AudioNode _connect(destination, [int output, int input]) native;
475 523
476 @DomName('AudioNode.disconnect') 524 @DomName('AudioNode.disconnect')
477 @DocsEditable() 525 @DocsEditable()
478 void disconnect(int output) native; 526 void disconnect([destination_OR_output, int output, int input]) native;
479 527
480 @DomName('AudioNode.connect') 528 @DomName('AudioNode.connect')
481 void connectNode(AudioNode destination, [int output = 0, int input = 0]) => 529 void connectNode(AudioNode destination, [int output = 0, int input = 0]) {
482 _connect(destination, output, input); 530 _connect(destination, output, input);
531 }
483 532
484 @DomName('AudioNode.connect') 533 @DomName('AudioNode.connect')
485 void connectParam(AudioParam destination, [int output = 0]) => 534 void connectParam(AudioParam destination, [int output = 0]) {
486 _connect(destination, output); 535 _connect(destination, output);
536 }
487 } 537 }
488 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 538 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
489 // for details. All rights reserved. Use of this source code is governed by a 539 // for details. All rights reserved. Use of this source code is governed by a
490 // BSD-style license that can be found in the LICENSE file. 540 // BSD-style license that can be found in the LICENSE file.
491 541
492 @DocsEditable() 542 @DocsEditable()
493 @DomName('AudioParam') 543 @DomName('AudioParam')
494 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPa ram 544 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPa ram
495 @Experimental() 545 @Experimental()
496 @Native("AudioParam") 546 @Native("AudioParam")
497 class AudioParam extends Interceptor { 547 class AudioParam extends Interceptor {
498 // To suppress missing implicit constructor warnings. 548 // To suppress missing implicit constructor warnings.
499 factory AudioParam._() { 549 factory AudioParam._() {
500 throw new UnsupportedError("Not supported"); 550 throw new UnsupportedError("Not supported");
501 } 551 }
502 552
503 @DomName('AudioParam.defaultValue') 553 @DomName('AudioParam.defaultValue')
504 @DocsEditable() 554 @DocsEditable()
505 final double defaultValue; 555 final double defaultValue;
506 556
507 @DomName('AudioParam.value') 557 @DomName('AudioParam.value')
508 @DocsEditable() 558 @DocsEditable()
509 num value; 559 num value;
510 560
511 @DomName('AudioParam.cancelScheduledValues') 561 @DomName('AudioParam.cancelScheduledValues')
512 @DocsEditable() 562 @DocsEditable()
513 void cancelScheduledValues(num startTime) native; 563 AudioParam cancelScheduledValues(num startTime) native;
514 564
515 @DomName('AudioParam.exponentialRampToValueAtTime') 565 @DomName('AudioParam.exponentialRampToValueAtTime')
516 @DocsEditable() 566 @DocsEditable()
517 void exponentialRampToValueAtTime(num value, num time) native; 567 AudioParam exponentialRampToValueAtTime(num value, num time) native;
518 568
519 @DomName('AudioParam.linearRampToValueAtTime') 569 @DomName('AudioParam.linearRampToValueAtTime')
520 @DocsEditable() 570 @DocsEditable()
521 void linearRampToValueAtTime(num value, num time) native; 571 AudioParam linearRampToValueAtTime(num value, num time) native;
522 572
523 @DomName('AudioParam.setTargetAtTime') 573 @DomName('AudioParam.setTargetAtTime')
524 @DocsEditable() 574 @DocsEditable()
525 void setTargetAtTime(num target, num time, num timeConstant) native; 575 AudioParam setTargetAtTime(num target, num time, num timeConstant) native;
526 576
527 @DomName('AudioParam.setValueAtTime') 577 @DomName('AudioParam.setValueAtTime')
528 @DocsEditable() 578 @DocsEditable()
529 void setValueAtTime(num value, num time) native; 579 AudioParam setValueAtTime(num value, num time) native;
530 580
531 @DomName('AudioParam.setValueCurveAtTime') 581 @DomName('AudioParam.setValueCurveAtTime')
532 @DocsEditable() 582 @DocsEditable()
533 void setValueCurveAtTime(Float32List values, num time, num duration) native; 583 AudioParam setValueCurveAtTime(Float32List values, num time, num duration)
584 native;
534 } 585 }
535 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 586 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
536 // for details. All rights reserved. Use of this source code is governed by a 587 // for details. All rights reserved. Use of this source code is governed by a
537 // BSD-style license that can be found in the LICENSE file. 588 // BSD-style license that can be found in the LICENSE file.
538 589
539 @DocsEditable() 590 @DocsEditable()
540 @DomName('AudioProcessingEvent') 591 @DomName('AudioProcessingEvent')
541 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPr ocessingEvent-section 592 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPr ocessingEvent-section
542 @Experimental() 593 @Experimental()
543 @Native("AudioProcessingEvent") 594 @Native("AudioProcessingEvent")
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 794
744 @DomName('GainNode.gain') 795 @DomName('GainNode.gain')
745 @DocsEditable() 796 @DocsEditable()
746 final AudioParam gain; 797 final AudioParam gain;
747 } 798 }
748 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 799 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
749 // for details. All rights reserved. Use of this source code is governed by a 800 // for details. All rights reserved. Use of this source code is governed by a
750 // BSD-style license that can be found in the LICENSE file. 801 // BSD-style license that can be found in the LICENSE file.
751 802
752 @DocsEditable() 803 @DocsEditable()
804 @DomName('IIRFilterNode')
805 @Experimental() // untriaged
806 @Native("IIRFilterNode")
807 class IirFilterNode extends AudioNode {
808 // To suppress missing implicit constructor warnings.
809 factory IirFilterNode._() {
810 throw new UnsupportedError("Not supported");
811 }
812
813 @DomName('IIRFilterNode.getFrequencyResponse')
814 @DocsEditable()
815 @Experimental() // untriaged
816 void getFrequencyResponse(Float32List frequencyHz, Float32List magResponse,
817 Float32List phaseResponse) native;
818 }
819 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
820 // for details. All rights reserved. Use of this source code is governed by a
821 // BSD-style license that can be found in the LICENSE file.
822
823 @DocsEditable()
753 @DomName('MediaElementAudioSourceNode') 824 @DomName('MediaElementAudioSourceNode')
754 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaEl ementAudioSourceNode 825 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaEl ementAudioSourceNode
755 @Experimental() 826 @Experimental()
756 @Native("MediaElementAudioSourceNode") 827 @Native("MediaElementAudioSourceNode")
757 class MediaElementAudioSourceNode extends AudioSourceNode { 828 class MediaElementAudioSourceNode extends AudioSourceNode {
758 // To suppress missing implicit constructor warnings. 829 // To suppress missing implicit constructor warnings.
759 factory MediaElementAudioSourceNode._() { 830 factory MediaElementAudioSourceNode._() {
760 throw new UnsupportedError("Not supported"); 831 throw new UnsupportedError("Not supported");
761 } 832 }
762 833
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 @DocsEditable() 912 @DocsEditable()
842 factory OfflineAudioContext( 913 factory OfflineAudioContext(
843 int numberOfChannels, int numberOfFrames, num sampleRate) { 914 int numberOfChannels, int numberOfFrames, num sampleRate) {
844 return OfflineAudioContext._create_1( 915 return OfflineAudioContext._create_1(
845 numberOfChannels, numberOfFrames, sampleRate); 916 numberOfChannels, numberOfFrames, sampleRate);
846 } 917 }
847 static OfflineAudioContext _create_1( 918 static OfflineAudioContext _create_1(
848 numberOfChannels, numberOfFrames, sampleRate) => 919 numberOfChannels, numberOfFrames, sampleRate) =>
849 JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)', 920 JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)',
850 numberOfChannels, numberOfFrames, sampleRate); 921 numberOfChannels, numberOfFrames, sampleRate);
922
923 @DomName('OfflineAudioContext.startRendering')
924 @DocsEditable()
925 @Experimental() // untriaged
926 Future startRendering() native;
927
928 @JSName('suspend')
929 @DomName('OfflineAudioContext.suspend')
930 @DocsEditable()
931 @Experimental() // untriaged
932 Future suspendFor(num suspendTime) native;
851 } 933 }
852 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 934 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
853 // for details. All rights reserved. Use of this source code is governed by a 935 // for details. All rights reserved. Use of this source code is governed by a
854 // BSD-style license that can be found in the LICENSE file. 936 // BSD-style license that can be found in the LICENSE file.
855 937
856 @DocsEditable() 938 @DocsEditable()
857 @DomName('OscillatorNode') 939 @DomName('OscillatorNode')
858 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Osc illatorNode 940 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Osc illatorNode
859 @Experimental() 941 @Experimental()
860 @Native("OscillatorNode,Oscillator") 942 @Native("OscillatorNode,Oscillator")
(...skipping 20 matching lines...) Expand all
881 final AudioParam detune; 963 final AudioParam detune;
882 964
883 @DomName('OscillatorNode.frequency') 965 @DomName('OscillatorNode.frequency')
884 @DocsEditable() 966 @DocsEditable()
885 final AudioParam frequency; 967 final AudioParam frequency;
886 968
887 @DomName('OscillatorNode.type') 969 @DomName('OscillatorNode.type')
888 @DocsEditable() 970 @DocsEditable()
889 String type; 971 String type;
890 972
891 @DomName('OscillatorNode.noteOff')
892 @DocsEditable()
893 void noteOff(num when) native;
894
895 @DomName('OscillatorNode.noteOn')
896 @DocsEditable()
897 void noteOn(num when) native;
898
899 @DomName('OscillatorNode.setPeriodicWave') 973 @DomName('OscillatorNode.setPeriodicWave')
900 @DocsEditable() 974 @DocsEditable()
901 @Experimental() // untriaged 975 @Experimental() // untriaged
902 void setPeriodicWave(PeriodicWave periodicWave) native; 976 void setPeriodicWave(PeriodicWave periodicWave) native;
903 977
904 @DomName('OscillatorNode.start') 978 @DomName('OscillatorNode.start')
905 @DocsEditable() 979 @DocsEditable()
906 void start([num when]) native; 980 void start([num when]) native;
907 981
908 @DomName('OscillatorNode.stop') 982 @DomName('OscillatorNode.stop')
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 @DocsEditable() 1110 @DocsEditable()
1037 @Experimental() // untriaged 1111 @Experimental() // untriaged
1038 Stream<AudioProcessingEvent> get onAudioProcess => 1112 Stream<AudioProcessingEvent> get onAudioProcess =>
1039 audioProcessEvent.forTarget(this); 1113 audioProcessEvent.forTarget(this);
1040 } 1114 }
1041 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1115 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1042 // for details. All rights reserved. Use of this source code is governed by a 1116 // for details. All rights reserved. Use of this source code is governed by a
1043 // BSD-style license that can be found in the LICENSE file. 1117 // BSD-style license that can be found in the LICENSE file.
1044 1118
1045 @DocsEditable() 1119 @DocsEditable()
1120 @DomName('StereoPannerNode')
1121 @Experimental() // untriaged
1122 @Native("StereoPannerNode")
1123 class StereoPannerNode extends AudioNode {
1124 // To suppress missing implicit constructor warnings.
1125 factory StereoPannerNode._() {
1126 throw new UnsupportedError("Not supported");
1127 }
1128
1129 @DomName('StereoPannerNode.pan')
1130 @DocsEditable()
1131 @Experimental() // untriaged
1132 final AudioParam pan;
1133 }
1134 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1135 // for details. All rights reserved. Use of this source code is governed by a
1136 // BSD-style license that can be found in the LICENSE file.
1137
1138 @DocsEditable()
1046 @DomName('WaveShaperNode') 1139 @DomName('WaveShaperNode')
1047 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Wav eShaperNode 1140 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Wav eShaperNode
1048 @Experimental() 1141 @Experimental()
1049 @Native("WaveShaperNode") 1142 @Native("WaveShaperNode")
1050 class WaveShaperNode extends AudioNode { 1143 class WaveShaperNode extends AudioNode {
1051 // To suppress missing implicit constructor warnings. 1144 // To suppress missing implicit constructor warnings.
1052 factory WaveShaperNode._() { 1145 factory WaveShaperNode._() {
1053 throw new UnsupportedError("Not supported"); 1146 throw new UnsupportedError("Not supported");
1054 } 1147 }
1055 1148
1056 @DomName('WaveShaperNode.curve') 1149 @DomName('WaveShaperNode.curve')
1057 @DocsEditable() 1150 @DocsEditable()
1058 Float32List curve; 1151 Float32List curve;
1059 1152
1060 @DomName('WaveShaperNode.oversample') 1153 @DomName('WaveShaperNode.oversample')
1061 @DocsEditable() 1154 @DocsEditable()
1062 String oversample; 1155 String oversample;
1063 } 1156 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698