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

Side by Side Diff: sdk/lib/web_audio/dartium/web_audio_dartium.dart

Issue 569783002: Migrate to Chrome 37 IDL (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
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:_internal' hide deprecated; 5 import 'dart:_internal' hide deprecated;
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 import 'dart:_blink' as _blink; 10 import 'dart:_blink' as _blink;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 @DomName('AnalyserNode.frequencyBinCount') 71 @DomName('AnalyserNode.frequencyBinCount')
72 @DocsEditable() 72 @DocsEditable()
73 int get frequencyBinCount => _blink.BlinkAnalyserNode.frequencyBinCount_Getter (this); 73 int get frequencyBinCount => _blink.BlinkAnalyserNode.frequencyBinCount_Getter (this);
74 74
75 @DomName('AnalyserNode.maxDecibels') 75 @DomName('AnalyserNode.maxDecibels')
76 @DocsEditable() 76 @DocsEditable()
77 num get maxDecibels => _blink.BlinkAnalyserNode.maxDecibels_Getter(this); 77 num get maxDecibels => _blink.BlinkAnalyserNode.maxDecibels_Getter(this);
78 78
79 @DomName('AnalyserNode.maxDecibels') 79 @DomName('AnalyserNode.maxDecibels')
80 @DocsEditable() 80 @DocsEditable()
81 void set maxDecibels(num value) => _blink.BlinkAnalyserNode.maxDecibels_Setter _float(this, value); 81 void set maxDecibels(num value) => _blink.BlinkAnalyserNode.maxDecibels_Setter _double(this, value);
82 82
83 @DomName('AnalyserNode.minDecibels') 83 @DomName('AnalyserNode.minDecibels')
84 @DocsEditable() 84 @DocsEditable()
85 num get minDecibels => _blink.BlinkAnalyserNode.minDecibels_Getter(this); 85 num get minDecibels => _blink.BlinkAnalyserNode.minDecibels_Getter(this);
86 86
87 @DomName('AnalyserNode.minDecibels') 87 @DomName('AnalyserNode.minDecibels')
88 @DocsEditable() 88 @DocsEditable()
89 void set minDecibels(num value) => _blink.BlinkAnalyserNode.minDecibels_Setter _float(this, value); 89 void set minDecibels(num value) => _blink.BlinkAnalyserNode.minDecibels_Setter _double(this, value);
90 90
91 @DomName('AnalyserNode.smoothingTimeConstant') 91 @DomName('AnalyserNode.smoothingTimeConstant')
92 @DocsEditable() 92 @DocsEditable()
93 num get smoothingTimeConstant => _blink.BlinkAnalyserNode.smoothingTimeConstan t_Getter(this); 93 num get smoothingTimeConstant => _blink.BlinkAnalyserNode.smoothingTimeConstan t_Getter(this);
94 94
95 @DomName('AnalyserNode.smoothingTimeConstant') 95 @DomName('AnalyserNode.smoothingTimeConstant')
96 @DocsEditable() 96 @DocsEditable()
97 void set smoothingTimeConstant(num value) => _blink.BlinkAnalyserNode.smoothin gTimeConstant_Setter_float(this, value); 97 void set smoothingTimeConstant(num value) => _blink.BlinkAnalyserNode.smoothin gTimeConstant_Setter_double(this, value);
98 98
99 @DomName('AnalyserNode.getByteFrequencyData') 99 @DomName('AnalyserNode.getByteFrequencyData')
100 @DocsEditable() 100 @DocsEditable()
101 void getByteFrequencyData(Uint8List array) => _blink.BlinkAnalyserNode.getByte FrequencyData_Callback_Uint8Array(this, array); 101 void getByteFrequencyData(Uint8List array) => _blink.BlinkAnalyserNode.getByte FrequencyData_Callback_Uint8Array(this, array);
102 102
103 @DomName('AnalyserNode.getByteTimeDomainData') 103 @DomName('AnalyserNode.getByteTimeDomainData')
104 @DocsEditable() 104 @DocsEditable()
105 void getByteTimeDomainData(Uint8List array) => _blink.BlinkAnalyserNode.getByt eTimeDomainData_Callback_Uint8Array(this, array); 105 void getByteTimeDomainData(Uint8List array) => _blink.BlinkAnalyserNode.getByt eTimeDomainData_Callback_Uint8Array(this, array);
106 106
107 @DomName('AnalyserNode.getFloatFrequencyData') 107 @DomName('AnalyserNode.getFloatFrequencyData')
108 @DocsEditable() 108 @DocsEditable()
109 void getFloatFrequencyData(Float32List array) => _blink.BlinkAnalyserNode.getF loatFrequencyData_Callback_Float32Array(this, array); 109 void getFloatFrequencyData(Float32List array) => _blink.BlinkAnalyserNode.getF loatFrequencyData_Callback_Float32Array(this, array);
110 110
111 @DomName('AnalyserNode.getFloatTimeDomainData')
112 @DocsEditable()
113 @Experimental() // untriaged
114 void getFloatTimeDomainData(Float32List array) => _blink.BlinkAnalyserNode.get FloatTimeDomainData_Callback_Float32Array(this, array);
115
111 } 116 }
112 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 117 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
113 // for details. All rights reserved. Use of this source code is governed by a 118 // for details. All rights reserved. Use of this source code is governed by a
114 // BSD-style license that can be found in the LICENSE file. 119 // BSD-style license that can be found in the LICENSE file.
115 120
116 // WARNING: Do not edit - generated code. 121 // WARNING: Do not edit - generated code.
117 122
118 123
119 @DocsEditable() 124 @DocsEditable()
120 @DomName('AudioBuffer') 125 @DomName('AudioBuffer')
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 * Static factory designed to expose `ended` events to event 182 * Static factory designed to expose `ended` events to event
178 * handlers that are not necessarily instances of [AudioBufferSourceNode]. 183 * handlers that are not necessarily instances of [AudioBufferSourceNode].
179 * 184 *
180 * See [EventStreamProvider] for usage information. 185 * See [EventStreamProvider] for usage information.
181 */ 186 */
182 @DomName('AudioBufferSourceNode.endedEvent') 187 @DomName('AudioBufferSourceNode.endedEvent')
183 @DocsEditable() 188 @DocsEditable()
184 @Experimental() // untriaged 189 @Experimental() // untriaged
185 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider <Event>('ended'); 190 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider <Event>('ended');
186 191
187 @DomName('AudioBufferSourceNode.FINISHED_STATE')
188 @DocsEditable()
189 static const int FINISHED_STATE = 3;
190
191 @DomName('AudioBufferSourceNode.PLAYING_STATE')
192 @DocsEditable()
193 static const int PLAYING_STATE = 2;
194
195 @DomName('AudioBufferSourceNode.SCHEDULED_STATE')
196 @DocsEditable()
197 static const int SCHEDULED_STATE = 1;
198
199 @DomName('AudioBufferSourceNode.UNSCHEDULED_STATE')
200 @DocsEditable()
201 static const int UNSCHEDULED_STATE = 0;
202
203 @DomName('AudioBufferSourceNode.buffer') 192 @DomName('AudioBufferSourceNode.buffer')
204 @DocsEditable() 193 @DocsEditable()
205 AudioBuffer get buffer => _blink.BlinkAudioBufferSourceNode.buffer_Getter(this ); 194 AudioBuffer get buffer => _blink.BlinkAudioBufferSourceNode.buffer_Getter(this );
206 195
207 @DomName('AudioBufferSourceNode.buffer') 196 @DomName('AudioBufferSourceNode.buffer')
208 @DocsEditable() 197 @DocsEditable()
209 void set buffer(AudioBuffer value) => _blink.BlinkAudioBufferSourceNode.buffer _Setter_AudioBuffer(this, value); 198 void set buffer(AudioBuffer value) => _blink.BlinkAudioBufferSourceNode.buffer _Setter_AudioBuffer(this, value);
210 199
211 @DomName('AudioBufferSourceNode.loop') 200 @DomName('AudioBufferSourceNode.loop')
212 @DocsEditable() 201 @DocsEditable()
(...skipping 16 matching lines...) Expand all
229 num get loopStart => _blink.BlinkAudioBufferSourceNode.loopStart_Getter(this); 218 num get loopStart => _blink.BlinkAudioBufferSourceNode.loopStart_Getter(this);
230 219
231 @DomName('AudioBufferSourceNode.loopStart') 220 @DomName('AudioBufferSourceNode.loopStart')
232 @DocsEditable() 221 @DocsEditable()
233 void set loopStart(num value) => _blink.BlinkAudioBufferSourceNode.loopStart_S etter_double(this, value); 222 void set loopStart(num value) => _blink.BlinkAudioBufferSourceNode.loopStart_S etter_double(this, value);
234 223
235 @DomName('AudioBufferSourceNode.playbackRate') 224 @DomName('AudioBufferSourceNode.playbackRate')
236 @DocsEditable() 225 @DocsEditable()
237 AudioParam get playbackRate => _blink.BlinkAudioBufferSourceNode.playbackRate_ Getter(this); 226 AudioParam get playbackRate => _blink.BlinkAudioBufferSourceNode.playbackRate_ Getter(this);
238 227
239 @DomName('AudioBufferSourceNode.noteGrainOn')
240 @DocsEditable()
241 void noteGrainOn(num when, num grainOffset, num grainDuration) => _blink.Blink AudioBufferSourceNode.noteGrainOn_Callback_double_double_double(this, when, grai nOffset, grainDuration);
242
243 @DomName('AudioBufferSourceNode.noteOff')
244 @DocsEditable()
245 void noteOff(num when) => _blink.BlinkAudioBufferSourceNode.noteOff_Callback_d ouble(this, when);
246
247 @DomName('AudioBufferSourceNode.noteOn')
248 @DocsEditable()
249 void noteOn(num when) => _blink.BlinkAudioBufferSourceNode.noteOn_Callback_dou ble(this, when);
250
251 void start([num when, num grainOffset, num grainDuration]) { 228 void start([num when, num grainOffset, num grainDuration]) {
252 if (grainDuration != null) { 229 if (grainDuration != null) {
253 _blink.BlinkAudioBufferSourceNode.start_Callback_double_double_double(this , when, grainOffset, grainDuration); 230 _blink.BlinkAudioBufferSourceNode.start_Callback_double_double_double(this , when, grainOffset, grainDuration);
254 return; 231 return;
255 } 232 }
256 if (grainOffset != null) { 233 if (grainOffset != null) {
257 _blink.BlinkAudioBufferSourceNode.start_Callback_double_double(this, when, grainOffset); 234 _blink.BlinkAudioBufferSourceNode.start_Callback_double_double(this, when, grainOffset);
258 return; 235 return;
259 } 236 }
260 if (when != null) { 237 if (when != null) {
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 factory AudioProcessingEvent._() { throw new UnsupportedError("Not supported") ; } 646 factory AudioProcessingEvent._() { throw new UnsupportedError("Not supported") ; }
670 647
671 @DomName('AudioProcessingEvent.inputBuffer') 648 @DomName('AudioProcessingEvent.inputBuffer')
672 @DocsEditable() 649 @DocsEditable()
673 AudioBuffer get inputBuffer => _blink.BlinkAudioProcessingEvent.inputBuffer_Ge tter(this); 650 AudioBuffer get inputBuffer => _blink.BlinkAudioProcessingEvent.inputBuffer_Ge tter(this);
674 651
675 @DomName('AudioProcessingEvent.outputBuffer') 652 @DomName('AudioProcessingEvent.outputBuffer')
676 @DocsEditable() 653 @DocsEditable()
677 AudioBuffer get outputBuffer => _blink.BlinkAudioProcessingEvent.outputBuffer_ Getter(this); 654 AudioBuffer get outputBuffer => _blink.BlinkAudioProcessingEvent.outputBuffer_ Getter(this);
678 655
656 @DomName('AudioProcessingEvent.playbackTime')
657 @DocsEditable()
658 @Experimental() // untriaged
659 double get playbackTime => _blink.BlinkAudioProcessingEvent.playbackTime_Gette r(this);
660
679 } 661 }
680 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 662 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
681 // for details. All rights reserved. Use of this source code is governed by a 663 // for details. All rights reserved. Use of this source code is governed by a
682 // BSD-style license that can be found in the LICENSE file. 664 // BSD-style license that can be found in the LICENSE file.
683 665
684 // WARNING: Do not edit - generated code. 666 // WARNING: Do not edit - generated code.
685 667
686 668
687 @DocsEditable() 669 @DocsEditable()
688 @DomName('AudioSourceNode') 670 @DomName('AudioSourceNode')
(...skipping 12 matching lines...) Expand all
701 683
702 684
703 @DocsEditable() 685 @DocsEditable()
704 @DomName('BiquadFilterNode') 686 @DomName('BiquadFilterNode')
705 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#BiquadF ilterNode-section 687 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#BiquadF ilterNode-section
706 @Experimental() 688 @Experimental()
707 class BiquadFilterNode extends AudioNode { 689 class BiquadFilterNode extends AudioNode {
708 // To suppress missing implicit constructor warnings. 690 // To suppress missing implicit constructor warnings.
709 factory BiquadFilterNode._() { throw new UnsupportedError("Not supported"); } 691 factory BiquadFilterNode._() { throw new UnsupportedError("Not supported"); }
710 692
711 @DomName('BiquadFilterNode.ALLPASS')
712 @DocsEditable()
713 static const int ALLPASS = 7;
714
715 @DomName('BiquadFilterNode.BANDPASS')
716 @DocsEditable()
717 static const int BANDPASS = 2;
718
719 @DomName('BiquadFilterNode.HIGHPASS')
720 @DocsEditable()
721 static const int HIGHPASS = 1;
722
723 @DomName('BiquadFilterNode.HIGHSHELF')
724 @DocsEditable()
725 static const int HIGHSHELF = 4;
726
727 @DomName('BiquadFilterNode.LOWPASS')
728 @DocsEditable()
729 static const int LOWPASS = 0;
730
731 @DomName('BiquadFilterNode.LOWSHELF')
732 @DocsEditable()
733 static const int LOWSHELF = 3;
734
735 @DomName('BiquadFilterNode.NOTCH')
736 @DocsEditable()
737 static const int NOTCH = 6;
738
739 @DomName('BiquadFilterNode.PEAKING')
740 @DocsEditable()
741 static const int PEAKING = 5;
742
743 @DomName('BiquadFilterNode.Q') 693 @DomName('BiquadFilterNode.Q')
744 @DocsEditable() 694 @DocsEditable()
745 AudioParam get Q => _blink.BlinkBiquadFilterNode.Q_Getter(this); 695 AudioParam get Q => _blink.BlinkBiquadFilterNode.Q_Getter(this);
746 696
747 @DomName('BiquadFilterNode.detune') 697 @DomName('BiquadFilterNode.detune')
748 @DocsEditable() 698 @DocsEditable()
749 AudioParam get detune => _blink.BlinkBiquadFilterNode.detune_Getter(this); 699 AudioParam get detune => _blink.BlinkBiquadFilterNode.detune_Getter(this);
750 700
751 @DomName('BiquadFilterNode.frequency') 701 @DomName('BiquadFilterNode.frequency')
752 @DocsEditable() 702 @DocsEditable()
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 * Static factory designed to expose `ended` events to event 985 * Static factory designed to expose `ended` events to event
1036 * handlers that are not necessarily instances of [OscillatorNode]. 986 * handlers that are not necessarily instances of [OscillatorNode].
1037 * 987 *
1038 * See [EventStreamProvider] for usage information. 988 * See [EventStreamProvider] for usage information.
1039 */ 989 */
1040 @DomName('OscillatorNode.endedEvent') 990 @DomName('OscillatorNode.endedEvent')
1041 @DocsEditable() 991 @DocsEditable()
1042 @Experimental() // untriaged 992 @Experimental() // untriaged
1043 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider <Event>('ended'); 993 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider <Event>('ended');
1044 994
1045 @DomName('OscillatorNode.FINISHED_STATE')
1046 @DocsEditable()
1047 static const int FINISHED_STATE = 3;
1048
1049 @DomName('OscillatorNode.PLAYING_STATE')
1050 @DocsEditable()
1051 static const int PLAYING_STATE = 2;
1052
1053 @DomName('OscillatorNode.SCHEDULED_STATE')
1054 @DocsEditable()
1055 static const int SCHEDULED_STATE = 1;
1056
1057 @DomName('OscillatorNode.UNSCHEDULED_STATE')
1058 @DocsEditable()
1059 static const int UNSCHEDULED_STATE = 0;
1060
1061 @DomName('OscillatorNode.detune') 995 @DomName('OscillatorNode.detune')
1062 @DocsEditable() 996 @DocsEditable()
1063 AudioParam get detune => _blink.BlinkOscillatorNode.detune_Getter(this); 997 AudioParam get detune => _blink.BlinkOscillatorNode.detune_Getter(this);
1064 998
1065 @DomName('OscillatorNode.frequency') 999 @DomName('OscillatorNode.frequency')
1066 @DocsEditable() 1000 @DocsEditable()
1067 AudioParam get frequency => _blink.BlinkOscillatorNode.frequency_Getter(this); 1001 AudioParam get frequency => _blink.BlinkOscillatorNode.frequency_Getter(this);
1068 1002
1069 @DomName('OscillatorNode.type') 1003 @DomName('OscillatorNode.type')
1070 @DocsEditable() 1004 @DocsEditable()
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 1161
1228 1162
1229 @DocsEditable() 1163 @DocsEditable()
1230 @DomName('ScriptProcessorNode') 1164 @DomName('ScriptProcessorNode')
1231 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ScriptP rocessorNode 1165 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ScriptP rocessorNode
1232 @Experimental() 1166 @Experimental()
1233 class ScriptProcessorNode extends AudioNode { 1167 class ScriptProcessorNode extends AudioNode {
1234 // To suppress missing implicit constructor warnings. 1168 // To suppress missing implicit constructor warnings.
1235 factory ScriptProcessorNode._() { throw new UnsupportedError("Not supported"); } 1169 factory ScriptProcessorNode._() { throw new UnsupportedError("Not supported"); }
1236 1170
1237 /**
1238 * Static factory designed to expose `audioprocess` events to event
1239 * handlers that are not necessarily instances of [ScriptProcessorNode].
1240 *
1241 * See [EventStreamProvider] for usage information.
1242 */
1243 @DomName('ScriptProcessorNode.audioprocessEvent')
1244 @DocsEditable()
1245 @Experimental() // untriaged
1246 static const EventStreamProvider<AudioProcessingEvent> audioProcessEvent = con st EventStreamProvider<AudioProcessingEvent>('audioprocess');
1247
1248 @DomName('ScriptProcessorNode.bufferSize') 1171 @DomName('ScriptProcessorNode.bufferSize')
1249 @DocsEditable() 1172 @DocsEditable()
1250 int get bufferSize => _blink.BlinkScriptProcessorNode.bufferSize_Getter(this); 1173 int get bufferSize => _blink.BlinkScriptProcessorNode.bufferSize_Getter(this);
1251 1174
1252 @DomName('ScriptProcessorNode._setEventListener') 1175 @DomName('ScriptProcessorNode.setEventListener')
1253 @DocsEditable()
1254 @Experimental() // non-standard
1255 void _setEventListener(EventListener eventListener) => _blink.BlinkScriptProce ssorNode.$_setEventListener_Callback_EventListener(this, eventListener);
1256
1257 /// Stream of `audioprocess` events handled by this [ScriptProcessorNode].
1258 /**
1259 * Get a Stream that fires events when AudioProcessingEvents occur.
1260 * This particular stream is special in that it only allows one listener to a
1261 * given stream. Converting the returned Stream [asBroadcast] will likely ruin
1262 * the soft-real-time properties which which these events are fired and can
1263 * be processed.
1264 */
1265 @DomName('ScriptProcessorNode.onaudioprocess')
1266 @DocsEditable() 1176 @DocsEditable()
1267 @Experimental() // untriaged 1177 @Experimental() // untriaged
1268 Stream<AudioProcessingEvent> get onAudioProcess => audioProcessEvent.forTarget (this); 1178 void setEventListener(EventListener eventListener) => _blink.BlinkScriptProces sorNode.setEventListener_Callback_EventListener(this, eventListener);
1269 1179
1270 } 1180 }
1271 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1181 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1272 // for details. All rights reserved. Use of this source code is governed by a 1182 // for details. All rights reserved. Use of this source code is governed by a
1273 // BSD-style license that can be found in the LICENSE file. 1183 // BSD-style license that can be found in the LICENSE file.
1274 1184
1275 // WARNING: Do not edit - generated code. 1185 // WARNING: Do not edit - generated code.
1276 1186
1277 1187
1278 @DocsEditable() 1188 @DocsEditable()
(...skipping 14 matching lines...) Expand all
1293 1203
1294 @DomName('WaveShaperNode.oversample') 1204 @DomName('WaveShaperNode.oversample')
1295 @DocsEditable() 1205 @DocsEditable()
1296 String get oversample => _blink.BlinkWaveShaperNode.oversample_Getter(this); 1206 String get oversample => _blink.BlinkWaveShaperNode.oversample_Getter(this);
1297 1207
1298 @DomName('WaveShaperNode.oversample') 1208 @DomName('WaveShaperNode.oversample')
1299 @DocsEditable() 1209 @DocsEditable()
1300 void set oversample(String value) => _blink.BlinkWaveShaperNode.oversample_Set ter_DOMString(this, value); 1210 void set oversample(String value) => _blink.BlinkWaveShaperNode.oversample_Set ter_DOMString(this, value);
1301 1211
1302 } 1212 }
OLDNEW
« no previous file with comments | « sdk/lib/web_audio/dart2js/web_audio_dart2js.dart ('k') | sdk/lib/web_gl/dart2js/web_gl_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698