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

Side by Side Diff: sdk/lib/web_audio/dart2js/web_audio_dart2js.dart

Issue 1763753002: Revert "Changes to tests and status file for the 45 roll w/ regenderated sdk/libs" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « sdk/lib/svg/dartium/svg_dartium.dart ('k') | sdk/lib/web_audio/dartium/web_audio_dartium.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, [int startInC hannel]) native;
108
109 @DomName('AudioBuffer.copyToChannel')
110 @DocsEditable()
111 @Experimental() // untriaged
112 void copyToChannel(Float32List source, int channelNumber, [int startInChannel] ) native;
113
114 @DomName('AudioBuffer.getChannelData') 104 @DomName('AudioBuffer.getChannelData')
115 @DocsEditable() 105 @DocsEditable()
116 Float32List getChannelData(int channelIndex) native; 106 Float32List getChannelData(int channelIndex) native;
117 } 107 }
118 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 108 // 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 109 // 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. 110 // BSD-style license that can be found in the LICENSE file.
121 111
122 // WARNING: Do not edit - generated code. 112 // WARNING: Do not edit - generated code.
123 113
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 */ 169 */
180 @DomName('AudioBufferSourceNode.endedEvent') 170 @DomName('AudioBufferSourceNode.endedEvent')
181 @DocsEditable() 171 @DocsEditable()
182 @Experimental() // untriaged 172 @Experimental() // untriaged
183 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider <Event>('ended'); 173 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider <Event>('ended');
184 174
185 @DomName('AudioBufferSourceNode.buffer') 175 @DomName('AudioBufferSourceNode.buffer')
186 @DocsEditable() 176 @DocsEditable()
187 AudioBuffer buffer; 177 AudioBuffer buffer;
188 178
189 @DomName('AudioBufferSourceNode.detune')
190 @DocsEditable()
191 @Experimental() // untriaged
192 final AudioParam detune;
193
194 @DomName('AudioBufferSourceNode.loop') 179 @DomName('AudioBufferSourceNode.loop')
195 @DocsEditable() 180 @DocsEditable()
196 bool loop; 181 bool loop;
197 182
198 @DomName('AudioBufferSourceNode.loopEnd') 183 @DomName('AudioBufferSourceNode.loopEnd')
199 @DocsEditable() 184 @DocsEditable()
200 num loopEnd; 185 num loopEnd;
201 186
202 @DomName('AudioBufferSourceNode.loopStart') 187 @DomName('AudioBufferSourceNode.loopStart')
203 @DocsEditable() 188 @DocsEditable()
(...skipping 18 matching lines...) Expand all
222 @DomName('AudioContext') 207 @DomName('AudioContext')
223 @SupportedBrowser(SupportedBrowser.CHROME) 208 @SupportedBrowser(SupportedBrowser.CHROME)
224 @SupportedBrowser(SupportedBrowser.FIREFOX) 209 @SupportedBrowser(SupportedBrowser.FIREFOX)
225 @Experimental() 210 @Experimental()
226 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioCo ntext-section 211 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioCo ntext-section
227 @Native("AudioContext,webkitAudioContext") 212 @Native("AudioContext,webkitAudioContext")
228 class AudioContext extends EventTarget { 213 class AudioContext extends EventTarget {
229 // To suppress missing implicit constructor warnings. 214 // To suppress missing implicit constructor warnings.
230 factory AudioContext._() { throw new UnsupportedError("Not supported"); } 215 factory AudioContext._() { throw new UnsupportedError("Not supported"); }
231 216
217 /**
218 * Static factory designed to expose `complete` events to event
219 * handlers that are not necessarily instances of [AudioContext].
220 *
221 * See [EventStreamProvider] for usage information.
222 */
223 @DomName('AudioContext.completeEvent')
224 @DocsEditable()
225 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi der<Event>('complete');
226
232 /// Checks if this type is supported on the current platform. 227 /// Checks if this type is supported on the current platform.
233 static bool get supported => JS('bool', '!!(window.AudioContext || window.webk itAudioContext)'); 228 static bool get supported => JS('bool', '!!(window.AudioContext || window.webk itAudioContext)');
234 229
235 @DomName('AudioContext.currentTime') 230 @DomName('AudioContext.currentTime')
236 @DocsEditable() 231 @DocsEditable()
237 final double currentTime; 232 final double currentTime;
238 233
239 @DomName('AudioContext.destination') 234 @DomName('AudioContext.destination')
240 @DocsEditable() 235 @DocsEditable()
241 final AudioDestinationNode destination; 236 final AudioDestinationNode destination;
242 237
243 @DomName('AudioContext.listener') 238 @DomName('AudioContext.listener')
244 @DocsEditable() 239 @DocsEditable()
245 final AudioListener listener; 240 final AudioListener listener;
246 241
247 @DomName('AudioContext.sampleRate') 242 @DomName('AudioContext.sampleRate')
248 @DocsEditable() 243 @DocsEditable()
249 final double sampleRate; 244 final double sampleRate;
250 245
251 @DomName('AudioContext.state')
252 @DocsEditable()
253 @Experimental() // untriaged
254 final String state;
255
256 @DomName('AudioContext.close')
257 @DocsEditable()
258 @Experimental() // untriaged
259 Future close() native;
260
261 @DomName('AudioContext.createAnalyser') 246 @DomName('AudioContext.createAnalyser')
262 @DocsEditable() 247 @DocsEditable()
263 AnalyserNode createAnalyser() native; 248 AnalyserNode createAnalyser() native;
264 249
265 @DomName('AudioContext.createBiquadFilter') 250 @DomName('AudioContext.createBiquadFilter')
266 @DocsEditable() 251 @DocsEditable()
267 BiquadFilterNode createBiquadFilter() native; 252 BiquadFilterNode createBiquadFilter() native;
268 253
269 @DomName('AudioContext.createBuffer') 254 @DomName('AudioContext.createBuffer')
270 @DocsEditable() 255 @DocsEditable()
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 297
313 @DomName('AudioContext.createPanner') 298 @DomName('AudioContext.createPanner')
314 @DocsEditable() 299 @DocsEditable()
315 PannerNode createPanner() native; 300 PannerNode createPanner() native;
316 301
317 @DomName('AudioContext.createPeriodicWave') 302 @DomName('AudioContext.createPeriodicWave')
318 @DocsEditable() 303 @DocsEditable()
319 @Experimental() // untriaged 304 @Experimental() // untriaged
320 PeriodicWave createPeriodicWave(Float32List real, Float32List imag) native; 305 PeriodicWave createPeriodicWave(Float32List real, Float32List imag) native;
321 306
322 @DomName('AudioContext.createStereoPanner')
323 @DocsEditable()
324 @Experimental() // untriaged
325 StereoPannerNode createStereoPanner() native;
326
327 @DomName('AudioContext.createWaveShaper') 307 @DomName('AudioContext.createWaveShaper')
328 @DocsEditable() 308 @DocsEditable()
329 WaveShaperNode createWaveShaper() native; 309 WaveShaperNode createWaveShaper() native;
330 310
331 @JSName('decodeAudioData') 311 @JSName('decodeAudioData')
332 @DomName('AudioContext.decodeAudioData') 312 @DomName('AudioContext.decodeAudioData')
333 @DocsEditable() 313 @DocsEditable()
334 void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallbac k, [AudioBufferCallback errorCallback]) native; 314 void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallbac k, [AudioBufferCallback errorCallback]) native;
335 315
336 @DomName('AudioContext.resume') 316 @DomName('AudioContext.startRendering')
337 @DocsEditable() 317 @DocsEditable()
338 @Experimental() // untriaged 318 void startRendering() native;
339 Future resume() native;
340 319
341 @DomName('AudioContext.suspend') 320 /// Stream of `complete` events handled by this [AudioContext].
321 @DomName('AudioContext.oncomplete')
342 @DocsEditable() 322 @DocsEditable()
343 @Experimental() // untriaged 323 Stream<Event> get onComplete => completeEvent.forTarget(this);
344 Future suspend() native;
345 324
346 factory AudioContext() => JS('AudioContext', 325 factory AudioContext() => JS('AudioContext',
347 'new (window.AudioContext || window.webkitAudioContext)()'); 326 'new (window.AudioContext || window.webkitAudioContext)()');
348 327
349 GainNode createGain() { 328 GainNode createGain() {
350 if (JS('bool', '#.createGain !== undefined', this)) { 329 if (JS('bool', '#.createGain !== undefined', this)) {
351 return JS('GainNode', '#.createGain()', this); 330 return JS('GainNode', '#.createGain()', this);
352 } else { 331 } else {
353 return JS('GainNode', '#.createGainNode()', this); 332 return JS('GainNode', '#.createGainNode()', this);
354 } 333 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 @DocsEditable() 448 @DocsEditable()
470 final int numberOfInputs; 449 final int numberOfInputs;
471 450
472 @DomName('AudioNode.numberOfOutputs') 451 @DomName('AudioNode.numberOfOutputs')
473 @DocsEditable() 452 @DocsEditable()
474 final int numberOfOutputs; 453 final int numberOfOutputs;
475 454
476 @JSName('connect') 455 @JSName('connect')
477 @DomName('AudioNode.connect') 456 @DomName('AudioNode.connect')
478 @DocsEditable() 457 @DocsEditable()
479 void _connect(destination, [int output, int input]) native; 458 void _connect(destination, int output, [int input]) native;
480 459
481 @DomName('AudioNode.disconnect') 460 @DomName('AudioNode.disconnect')
482 @DocsEditable() 461 @DocsEditable()
483 void disconnect([destination_OR_output, int output, int input]) native; 462 void disconnect(int output) native;
484 463
485 @DomName('AudioNode.connect') 464 @DomName('AudioNode.connect')
486 void connectNode(AudioNode destination, [int output = 0, int input = 0]) => 465 void connectNode(AudioNode destination, [int output = 0, int input = 0]) =>
487 _connect(destination, output, input); 466 _connect(destination, output, input);
488 467
489 @DomName('AudioNode.connect') 468 @DomName('AudioNode.connect')
490 void connectParam(AudioParam destination, [int output = 0]) => 469 void connectParam(AudioParam destination, [int output = 0]) =>
491 _connect(destination, output); 470 _connect(destination, output);
492 } 471 }
493 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 472 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 class OfflineAudioContext extends AudioContext { 804 class OfflineAudioContext extends AudioContext {
826 // To suppress missing implicit constructor warnings. 805 // To suppress missing implicit constructor warnings.
827 factory OfflineAudioContext._() { throw new UnsupportedError("Not supported"); } 806 factory OfflineAudioContext._() { throw new UnsupportedError("Not supported"); }
828 807
829 @DomName('OfflineAudioContext.OfflineAudioContext') 808 @DomName('OfflineAudioContext.OfflineAudioContext')
830 @DocsEditable() 809 @DocsEditable()
831 factory OfflineAudioContext(int numberOfChannels, int numberOfFrames, num samp leRate) { 810 factory OfflineAudioContext(int numberOfChannels, int numberOfFrames, num samp leRate) {
832 return OfflineAudioContext._create_1(numberOfChannels, numberOfFrames, sampl eRate); 811 return OfflineAudioContext._create_1(numberOfChannels, numberOfFrames, sampl eRate);
833 } 812 }
834 static OfflineAudioContext _create_1(numberOfChannels, numberOfFrames, sampleR ate) => JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)', numberOfChan nels, numberOfFrames, sampleRate); 813 static OfflineAudioContext _create_1(numberOfChannels, numberOfFrames, sampleR ate) => JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)', numberOfChan nels, numberOfFrames, sampleRate);
835
836 @DomName('OfflineAudioContext.startRendering')
837 @DocsEditable()
838 @Experimental() // untriaged
839 Future startRendering() native;
840 } 814 }
841 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 815 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
842 // for details. All rights reserved. Use of this source code is governed by a 816 // for details. All rights reserved. Use of this source code is governed by a
843 // BSD-style license that can be found in the LICENSE file. 817 // BSD-style license that can be found in the LICENSE file.
844 818
845 819
846 @DocsEditable() 820 @DocsEditable()
847 @DomName('OscillatorNode') 821 @DomName('OscillatorNode')
848 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Osc illatorNode 822 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Osc illatorNode
849 @Experimental() 823 @Experimental()
(...skipping 18 matching lines...) Expand all
868 final AudioParam detune; 842 final AudioParam detune;
869 843
870 @DomName('OscillatorNode.frequency') 844 @DomName('OscillatorNode.frequency')
871 @DocsEditable() 845 @DocsEditable()
872 final AudioParam frequency; 846 final AudioParam frequency;
873 847
874 @DomName('OscillatorNode.type') 848 @DomName('OscillatorNode.type')
875 @DocsEditable() 849 @DocsEditable()
876 String type; 850 String type;
877 851
852 @DomName('OscillatorNode.noteOff')
853 @DocsEditable()
854 void noteOff(num when) native;
855
856 @DomName('OscillatorNode.noteOn')
857 @DocsEditable()
858 void noteOn(num when) native;
859
878 @DomName('OscillatorNode.setPeriodicWave') 860 @DomName('OscillatorNode.setPeriodicWave')
879 @DocsEditable() 861 @DocsEditable()
880 @Experimental() // untriaged 862 @Experimental() // untriaged
881 void setPeriodicWave(PeriodicWave periodicWave) native; 863 void setPeriodicWave(PeriodicWave periodicWave) native;
882 864
883 @DomName('OscillatorNode.start') 865 @DomName('OscillatorNode.start')
884 @DocsEditable() 866 @DocsEditable()
885 void start([num when]) native; 867 void start([num when]) native;
886 868
887 @DomName('OscillatorNode.stop') 869 @DomName('OscillatorNode.stop')
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 @DocsEditable() 993 @DocsEditable()
1012 @Experimental() // untriaged 994 @Experimental() // untriaged
1013 Stream<AudioProcessingEvent> get onAudioProcess => audioProcessEvent.forTarget (this); 995 Stream<AudioProcessingEvent> get onAudioProcess => audioProcessEvent.forTarget (this);
1014 } 996 }
1015 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 997 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1016 // for details. All rights reserved. Use of this source code is governed by a 998 // for details. All rights reserved. Use of this source code is governed by a
1017 // BSD-style license that can be found in the LICENSE file. 999 // BSD-style license that can be found in the LICENSE file.
1018 1000
1019 1001
1020 @DocsEditable() 1002 @DocsEditable()
1021 @DomName('StereoPannerNode')
1022 @Experimental() // untriaged
1023 @Native("StereoPannerNode")
1024 class StereoPannerNode extends AudioNode {
1025 // To suppress missing implicit constructor warnings.
1026 factory StereoPannerNode._() { throw new UnsupportedError("Not supported"); }
1027
1028 @DomName('StereoPannerNode.pan')
1029 @DocsEditable()
1030 @Experimental() // untriaged
1031 final AudioParam pan;
1032 }
1033 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1034 // for details. All rights reserved. Use of this source code is governed by a
1035 // BSD-style license that can be found in the LICENSE file.
1036
1037
1038 @DocsEditable()
1039 @DomName('WaveShaperNode') 1003 @DomName('WaveShaperNode')
1040 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Wav eShaperNode 1004 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Wav eShaperNode
1041 @Experimental() 1005 @Experimental()
1042 @Native("WaveShaperNode") 1006 @Native("WaveShaperNode")
1043 class WaveShaperNode extends AudioNode { 1007 class WaveShaperNode extends AudioNode {
1044 // To suppress missing implicit constructor warnings. 1008 // To suppress missing implicit constructor warnings.
1045 factory WaveShaperNode._() { throw new UnsupportedError("Not supported"); } 1009 factory WaveShaperNode._() { throw new UnsupportedError("Not supported"); }
1046 1010
1047 @DomName('WaveShaperNode.curve') 1011 @DomName('WaveShaperNode.curve')
1048 @DocsEditable() 1012 @DocsEditable()
1049 Float32List curve; 1013 Float32List curve;
1050 1014
1051 @DomName('WaveShaperNode.oversample') 1015 @DomName('WaveShaperNode.oversample')
1052 @DocsEditable() 1016 @DocsEditable()
1053 String oversample; 1017 String oversample;
1054 } 1018 }
OLDNEW
« no previous file with comments | « sdk/lib/svg/dartium/svg_dartium.dart ('k') | sdk/lib/web_audio/dartium/web_audio_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698