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'; |
11 import 'dart:_native_typed_data'; | 11 import 'dart:_native_typed_data'; |
12 import 'dart:typed_data'; | 12 import 'dart:typed_data'; |
13 import 'dart:_js_helper' show Creates, JSName, Native, Returns, convertDartClosu
reToJS; | 13 import 'dart:_js_helper' |
| 14 show Creates, JSName, Native, Returns, convertDartClosureToJS; |
14 import 'dart:_foreign_helper' show JS; | 15 import 'dart:_foreign_helper' show JS; |
15 import 'dart:_interceptors' show Interceptor; | 16 import 'dart:_interceptors' show Interceptor; |
16 // DO NOT EDIT - unless you are editing documentation as per: | 17 // DO NOT EDIT - unless you are editing documentation as per: |
17 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation | 18 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation |
18 // Auto-generated dart:audio library. | 19 // Auto-generated dart:audio library. |
19 | 20 |
20 | |
21 | |
22 | |
23 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 21 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
24 // for details. All rights reserved. Use of this source code is governed by a | 22 // for details. All rights reserved. Use of this source code is governed by a |
25 // BSD-style license that can be found in the LICENSE file. | 23 // BSD-style license that can be found in the LICENSE file. |
26 | 24 |
27 | |
28 @DocsEditable() | 25 @DocsEditable() |
29 @DomName('AnalyserNode') | 26 @DomName('AnalyserNode') |
30 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Analyse
rNode | 27 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Analyse
rNode |
31 @Experimental() | 28 @Experimental() |
32 @Native("AnalyserNode,RealtimeAnalyserNode") | 29 @Native("AnalyserNode,RealtimeAnalyserNode") |
33 class AnalyserNode extends AudioNode { | 30 class AnalyserNode extends AudioNode { |
34 // To suppress missing implicit constructor warnings. | 31 // To suppress missing implicit constructor warnings. |
35 factory AnalyserNode._() { throw new UnsupportedError("Not supported"); } | 32 factory AnalyserNode._() { |
| 33 throw new UnsupportedError("Not supported"); |
| 34 } |
36 | 35 |
37 @DomName('AnalyserNode.fftSize') | 36 @DomName('AnalyserNode.fftSize') |
38 @DocsEditable() | 37 @DocsEditable() |
39 int fftSize; | 38 int fftSize; |
40 | 39 |
41 @DomName('AnalyserNode.frequencyBinCount') | 40 @DomName('AnalyserNode.frequencyBinCount') |
42 @DocsEditable() | 41 @DocsEditable() |
43 final int frequencyBinCount; | 42 final int frequencyBinCount; |
44 | 43 |
45 @DomName('AnalyserNode.maxDecibels') | 44 @DomName('AnalyserNode.maxDecibels') |
46 @DocsEditable() | 45 @DocsEditable() |
47 num maxDecibels; | 46 num maxDecibels; |
48 | 47 |
49 @DomName('AnalyserNode.minDecibels') | 48 @DomName('AnalyserNode.minDecibels') |
50 @DocsEditable() | 49 @DocsEditable() |
51 num minDecibels; | 50 num minDecibels; |
52 | 51 |
53 @DomName('AnalyserNode.smoothingTimeConstant') | 52 @DomName('AnalyserNode.smoothingTimeConstant') |
54 @DocsEditable() | 53 @DocsEditable() |
55 num smoothingTimeConstant; | 54 num smoothingTimeConstant; |
56 | 55 |
57 @DomName('AnalyserNode.getByteFrequencyData') | 56 @DomName('AnalyserNode.getByteFrequencyData') |
58 @DocsEditable() | 57 @DocsEditable() |
59 void getByteFrequencyData(Uint8List array) native; | 58 void getByteFrequencyData(Uint8List array) native ; |
60 | 59 |
61 @DomName('AnalyserNode.getByteTimeDomainData') | 60 @DomName('AnalyserNode.getByteTimeDomainData') |
62 @DocsEditable() | 61 @DocsEditable() |
63 void getByteTimeDomainData(Uint8List array) native; | 62 void getByteTimeDomainData(Uint8List array) native ; |
64 | 63 |
65 @DomName('AnalyserNode.getFloatFrequencyData') | 64 @DomName('AnalyserNode.getFloatFrequencyData') |
66 @DocsEditable() | 65 @DocsEditable() |
67 void getFloatFrequencyData(Float32List array) native; | 66 void getFloatFrequencyData(Float32List array) native ; |
68 | 67 |
69 @DomName('AnalyserNode.getFloatTimeDomainData') | 68 @DomName('AnalyserNode.getFloatTimeDomainData') |
70 @DocsEditable() | 69 @DocsEditable() |
71 @Experimental() // untriaged | 70 @Experimental() // untriaged |
72 void getFloatTimeDomainData(Float32List array) native; | 71 void getFloatTimeDomainData(Float32List array) native ; |
73 } | 72 } |
74 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 73 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
75 // for details. All rights reserved. Use of this source code is governed by a | 74 // for details. All rights reserved. Use of this source code is governed by a |
76 // BSD-style license that can be found in the LICENSE file. | 75 // BSD-style license that can be found in the LICENSE file. |
77 | 76 |
78 | |
79 @DocsEditable() | 77 @DocsEditable() |
80 @DomName('AudioBuffer') | 78 @DomName('AudioBuffer') |
81 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu
ffer-section | 79 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu
ffer-section |
82 @Experimental() | 80 @Experimental() |
83 @Native("AudioBuffer") | 81 @Native("AudioBuffer") |
84 class AudioBuffer extends Interceptor { | 82 class AudioBuffer extends Interceptor { |
85 // To suppress missing implicit constructor warnings. | 83 // To suppress missing implicit constructor warnings. |
86 factory AudioBuffer._() { throw new UnsupportedError("Not supported"); } | 84 factory AudioBuffer._() { |
| 85 throw new UnsupportedError("Not supported"); |
| 86 } |
87 | 87 |
88 @DomName('AudioBuffer.duration') | 88 @DomName('AudioBuffer.duration') |
89 @DocsEditable() | 89 @DocsEditable() |
90 final double duration; | 90 final double duration; |
91 | 91 |
92 @DomName('AudioBuffer.length') | 92 @DomName('AudioBuffer.length') |
93 @DocsEditable() | 93 @DocsEditable() |
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') | 104 @DomName('AudioBuffer.copyFromChannel') |
105 @DocsEditable() | 105 @DocsEditable() |
106 @Experimental() // untriaged | 106 @Experimental() // untriaged |
107 void copyFromChannel(Float32List destination, int channelNumber, [int startInC
hannel]) native; | 107 void copyFromChannel(Float32List destination, int channelNumber, |
| 108 [int startInChannel]) native ; |
108 | 109 |
109 @DomName('AudioBuffer.copyToChannel') | 110 @DomName('AudioBuffer.copyToChannel') |
110 @DocsEditable() | 111 @DocsEditable() |
111 @Experimental() // untriaged | 112 @Experimental() // untriaged |
112 void copyToChannel(Float32List source, int channelNumber, [int startInChannel]
) native; | 113 void copyToChannel(Float32List source, int channelNumber, |
| 114 [int startInChannel]) native ; |
113 | 115 |
114 @DomName('AudioBuffer.getChannelData') | 116 @DomName('AudioBuffer.getChannelData') |
115 @DocsEditable() | 117 @DocsEditable() |
116 Float32List getChannelData(int channelIndex) native; | 118 Float32List getChannelData(int channelIndex) native ; |
117 } | 119 } |
118 // 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 |
119 // 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 |
120 // BSD-style license that can be found in the LICENSE file. | 122 // BSD-style license that can be found in the LICENSE file. |
121 | 123 |
122 // WARNING: Do not edit - generated code. | 124 // WARNING: Do not edit - generated code. |
123 | 125 |
124 | |
125 @DomName('AudioBufferCallback') | 126 @DomName('AudioBufferCallback') |
126 // 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 |
127 @Experimental() | 128 @Experimental() |
128 typedef void AudioBufferCallback(AudioBuffer audioBuffer); | 129 typedef void AudioBufferCallback(AudioBuffer audioBuffer); |
129 // 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 |
130 // 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 |
131 // BSD-style license that can be found in the LICENSE file. | 132 // BSD-style license that can be found in the LICENSE file. |
132 | 133 |
133 | |
134 @DomName('AudioBufferSourceNode') | 134 @DomName('AudioBufferSourceNode') |
135 @SupportedBrowser(SupportedBrowser.CHROME) | 135 @SupportedBrowser(SupportedBrowser.CHROME) |
136 @SupportedBrowser(SupportedBrowser.FIREFOX) | 136 @SupportedBrowser(SupportedBrowser.FIREFOX) |
137 @Experimental() | 137 @Experimental() |
138 // 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 |
139 @Native("AudioBufferSourceNode") | 139 @Native("AudioBufferSourceNode") |
140 class AudioBufferSourceNode extends AudioSourceNode { | 140 class AudioBufferSourceNode extends AudioSourceNode { |
141 | |
142 // TODO(efortuna): Remove these methods when Chrome stable also uses start | 141 // TODO(efortuna): Remove these methods when Chrome stable also uses start |
143 // instead of noteOn. | 142 // instead of noteOn. |
144 void start(num when, [num grainOffset, num grainDuration]) { | 143 void start(num when, [num grainOffset, num grainDuration]) { |
145 if (JS('bool', '!!#.start', this)) { | 144 if (JS('bool', '!!#.start', this)) { |
146 if (grainDuration != null) { | 145 if (grainDuration != null) { |
147 JS('void', '#.start(#, #, #)', this, when, grainOffset, grainDuration); | 146 JS('void', '#.start(#, #, #)', this, when, grainOffset, grainDuration); |
148 } else if (grainOffset != null) { | 147 } else if (grainOffset != null) { |
149 JS('void', '#.start(#, #)', this, when, grainOffset); | 148 JS('void', '#.start(#, #)', this, when, grainOffset); |
150 } else { | 149 } else { |
151 JS('void', '#.start(#)', this, when); | 150 JS('void', '#.start(#)', this, when); |
152 } | 151 } |
153 } else { | 152 } else { |
154 if (grainDuration != null) { | 153 if (grainDuration != null) { |
155 JS('void', '#.noteOn(#, #, #)', this, when, grainOffset, grainDuration); | 154 JS('void', '#.noteOn(#, #, #)', this, when, grainOffset, grainDuration); |
156 } else if (grainOffset != null) { | 155 } else if (grainOffset != null) { |
157 JS('void', '#.noteOn(#, #)', this, when, grainOffset); | 156 JS('void', '#.noteOn(#, #)', this, when, grainOffset); |
158 } else { | 157 } else { |
159 JS('void', '#.noteOn(#)', this, when); | 158 JS('void', '#.noteOn(#)', this, when); |
160 } | 159 } |
161 } | 160 } |
162 } | 161 } |
163 | 162 |
164 void stop(num when) { | 163 void stop(num when) { |
165 if (JS('bool', '!!#.stop', this)) { | 164 if (JS('bool', '!!#.stop', this)) { |
166 JS('void', '#.stop(#)', this, when); | 165 JS('void', '#.stop(#)', this, when); |
167 } else { | 166 } else { |
168 JS('void', '#.noteOff(#)', this, when); | 167 JS('void', '#.noteOff(#)', this, when); |
169 } | 168 } |
170 } | 169 } |
| 170 |
171 // To suppress missing implicit constructor warnings. | 171 // To suppress missing implicit constructor warnings. |
172 factory AudioBufferSourceNode._() { throw new UnsupportedError("Not supported"
); } | 172 factory AudioBufferSourceNode._() { |
| 173 throw new UnsupportedError("Not supported"); |
| 174 } |
173 | 175 |
174 /** | 176 /** |
175 * Static factory designed to expose `ended` events to event | 177 * Static factory designed to expose `ended` events to event |
176 * handlers that are not necessarily instances of [AudioBufferSourceNode]. | 178 * handlers that are not necessarily instances of [AudioBufferSourceNode]. |
177 * | 179 * |
178 * See [EventStreamProvider] for usage information. | 180 * See [EventStreamProvider] for usage information. |
179 */ | 181 */ |
180 @DomName('AudioBufferSourceNode.endedEvent') | 182 @DomName('AudioBufferSourceNode.endedEvent') |
181 @DocsEditable() | 183 @DocsEditable() |
182 @Experimental() // untriaged | 184 @Experimental() // untriaged |
183 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider
<Event>('ended'); | 185 static const EventStreamProvider<Event> endedEvent = |
| 186 const EventStreamProvider<Event>('ended'); |
184 | 187 |
185 @DomName('AudioBufferSourceNode.buffer') | 188 @DomName('AudioBufferSourceNode.buffer') |
186 @DocsEditable() | 189 @DocsEditable() |
187 AudioBuffer buffer; | 190 AudioBuffer buffer; |
188 | 191 |
189 @DomName('AudioBufferSourceNode.detune') | 192 @DomName('AudioBufferSourceNode.detune') |
190 @DocsEditable() | 193 @DocsEditable() |
191 @Experimental() // untriaged | 194 @Experimental() // untriaged |
192 final AudioParam detune; | 195 final AudioParam detune; |
193 | 196 |
(...skipping 11 matching lines...) Expand all Loading... |
205 | 208 |
206 @DomName('AudioBufferSourceNode.playbackRate') | 209 @DomName('AudioBufferSourceNode.playbackRate') |
207 @DocsEditable() | 210 @DocsEditable() |
208 final AudioParam playbackRate; | 211 final AudioParam playbackRate; |
209 | 212 |
210 /// Stream of `ended` events handled by this [AudioBufferSourceNode]. | 213 /// Stream of `ended` events handled by this [AudioBufferSourceNode]. |
211 @DomName('AudioBufferSourceNode.onended') | 214 @DomName('AudioBufferSourceNode.onended') |
212 @DocsEditable() | 215 @DocsEditable() |
213 @Experimental() // untriaged | 216 @Experimental() // untriaged |
214 Stream<Event> get onEnded => endedEvent.forTarget(this); | 217 Stream<Event> get onEnded => endedEvent.forTarget(this); |
215 | |
216 } | 218 } |
217 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 219 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
218 // for details. All rights reserved. Use of this source code is governed by a | 220 // for details. All rights reserved. Use of this source code is governed by a |
219 // BSD-style license that can be found in the LICENSE file. | 221 // BSD-style license that can be found in the LICENSE file. |
220 | 222 |
221 | |
222 @DomName('AudioContext') | 223 @DomName('AudioContext') |
223 @SupportedBrowser(SupportedBrowser.CHROME) | 224 @SupportedBrowser(SupportedBrowser.CHROME) |
224 @SupportedBrowser(SupportedBrowser.FIREFOX) | 225 @SupportedBrowser(SupportedBrowser.FIREFOX) |
225 @Experimental() | 226 @Experimental() |
226 // 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 |
227 @Native("AudioContext,webkitAudioContext") | 228 @Native("AudioContext,webkitAudioContext") |
228 class AudioContext extends EventTarget { | 229 class AudioContext extends EventTarget { |
229 // To suppress missing implicit constructor warnings. | 230 // To suppress missing implicit constructor warnings. |
230 factory AudioContext._() { throw new UnsupportedError("Not supported"); } | 231 factory AudioContext._() { |
| 232 throw new UnsupportedError("Not supported"); |
| 233 } |
231 | 234 |
232 /// Checks if this type is supported on the current platform. | 235 /// Checks if this type is supported on the current platform. |
233 static bool get supported => JS('bool', '!!(window.AudioContext || window.webk
itAudioContext)'); | 236 static bool get supported => |
| 237 JS('bool', '!!(window.AudioContext || window.webkitAudioContext)'); |
234 | 238 |
235 @DomName('AudioContext.currentTime') | 239 @DomName('AudioContext.currentTime') |
236 @DocsEditable() | 240 @DocsEditable() |
237 final double currentTime; | 241 final double currentTime; |
238 | 242 |
239 @DomName('AudioContext.destination') | 243 @DomName('AudioContext.destination') |
240 @DocsEditable() | 244 @DocsEditable() |
241 final AudioDestinationNode destination; | 245 final AudioDestinationNode destination; |
242 | 246 |
243 @DomName('AudioContext.listener') | 247 @DomName('AudioContext.listener') |
244 @DocsEditable() | 248 @DocsEditable() |
245 final AudioListener listener; | 249 final AudioListener listener; |
246 | 250 |
247 @DomName('AudioContext.sampleRate') | 251 @DomName('AudioContext.sampleRate') |
248 @DocsEditable() | 252 @DocsEditable() |
249 final double sampleRate; | 253 final double sampleRate; |
250 | 254 |
251 @DomName('AudioContext.state') | 255 @DomName('AudioContext.state') |
252 @DocsEditable() | 256 @DocsEditable() |
253 @Experimental() // untriaged | 257 @Experimental() // untriaged |
254 final String state; | 258 final String state; |
255 | 259 |
256 @DomName('AudioContext.close') | 260 @DomName('AudioContext.close') |
257 @DocsEditable() | 261 @DocsEditable() |
258 @Experimental() // untriaged | 262 @Experimental() // untriaged |
259 Future close() native; | 263 Future close() native ; |
260 | 264 |
261 @DomName('AudioContext.createAnalyser') | 265 @DomName('AudioContext.createAnalyser') |
262 @DocsEditable() | 266 @DocsEditable() |
263 AnalyserNode createAnalyser() native; | 267 AnalyserNode createAnalyser() native ; |
264 | 268 |
265 @DomName('AudioContext.createBiquadFilter') | 269 @DomName('AudioContext.createBiquadFilter') |
266 @DocsEditable() | 270 @DocsEditable() |
267 BiquadFilterNode createBiquadFilter() native; | 271 BiquadFilterNode createBiquadFilter() native ; |
268 | 272 |
269 @DomName('AudioContext.createBuffer') | 273 @DomName('AudioContext.createBuffer') |
270 @DocsEditable() | 274 @DocsEditable() |
271 AudioBuffer createBuffer(int numberOfChannels, int numberOfFrames, num sampleR
ate) native; | 275 AudioBuffer createBuffer( |
| 276 int numberOfChannels, int numberOfFrames, num sampleRate) native ; |
272 | 277 |
273 @DomName('AudioContext.createBufferSource') | 278 @DomName('AudioContext.createBufferSource') |
274 @DocsEditable() | 279 @DocsEditable() |
275 AudioBufferSourceNode createBufferSource() native; | 280 AudioBufferSourceNode createBufferSource() native ; |
276 | 281 |
277 @DomName('AudioContext.createChannelMerger') | 282 @DomName('AudioContext.createChannelMerger') |
278 @DocsEditable() | 283 @DocsEditable() |
279 ChannelMergerNode createChannelMerger([int numberOfInputs]) native; | 284 ChannelMergerNode createChannelMerger([int numberOfInputs]) native ; |
280 | 285 |
281 @DomName('AudioContext.createChannelSplitter') | 286 @DomName('AudioContext.createChannelSplitter') |
282 @DocsEditable() | 287 @DocsEditable() |
283 ChannelSplitterNode createChannelSplitter([int numberOfOutputs]) native; | 288 ChannelSplitterNode createChannelSplitter([int numberOfOutputs]) native ; |
284 | 289 |
285 @DomName('AudioContext.createConvolver') | 290 @DomName('AudioContext.createConvolver') |
286 @DocsEditable() | 291 @DocsEditable() |
287 ConvolverNode createConvolver() native; | 292 ConvolverNode createConvolver() native ; |
288 | 293 |
289 @DomName('AudioContext.createDelay') | 294 @DomName('AudioContext.createDelay') |
290 @DocsEditable() | 295 @DocsEditable() |
291 DelayNode createDelay([num maxDelayTime]) native; | 296 DelayNode createDelay([num maxDelayTime]) native ; |
292 | 297 |
293 @DomName('AudioContext.createDynamicsCompressor') | 298 @DomName('AudioContext.createDynamicsCompressor') |
294 @DocsEditable() | 299 @DocsEditable() |
295 DynamicsCompressorNode createDynamicsCompressor() native; | 300 DynamicsCompressorNode createDynamicsCompressor() native ; |
296 | 301 |
297 @DomName('AudioContext.createMediaElementSource') | 302 @DomName('AudioContext.createMediaElementSource') |
298 @DocsEditable() | 303 @DocsEditable() |
299 MediaElementAudioSourceNode createMediaElementSource(MediaElement mediaElement
) native; | 304 MediaElementAudioSourceNode createMediaElementSource( |
| 305 MediaElement mediaElement) native ; |
300 | 306 |
301 @DomName('AudioContext.createMediaStreamDestination') | 307 @DomName('AudioContext.createMediaStreamDestination') |
302 @DocsEditable() | 308 @DocsEditable() |
303 MediaStreamAudioDestinationNode createMediaStreamDestination() native; | 309 MediaStreamAudioDestinationNode createMediaStreamDestination() native ; |
304 | 310 |
305 @DomName('AudioContext.createMediaStreamSource') | 311 @DomName('AudioContext.createMediaStreamSource') |
306 @DocsEditable() | 312 @DocsEditable() |
307 MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream) na
tive; | 313 MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream) |
| 314 native ; |
308 | 315 |
309 @DomName('AudioContext.createOscillator') | 316 @DomName('AudioContext.createOscillator') |
310 @DocsEditable() | 317 @DocsEditable() |
311 OscillatorNode createOscillator() native; | 318 OscillatorNode createOscillator() native ; |
312 | 319 |
313 @DomName('AudioContext.createPanner') | 320 @DomName('AudioContext.createPanner') |
314 @DocsEditable() | 321 @DocsEditable() |
315 PannerNode createPanner() native; | 322 PannerNode createPanner() native ; |
316 | 323 |
317 @DomName('AudioContext.createPeriodicWave') | 324 @DomName('AudioContext.createPeriodicWave') |
318 @DocsEditable() | 325 @DocsEditable() |
319 @Experimental() // untriaged | 326 @Experimental() // untriaged |
320 PeriodicWave createPeriodicWave(Float32List real, Float32List imag) native; | 327 PeriodicWave createPeriodicWave(Float32List real, Float32List imag) native ; |
321 | 328 |
322 @DomName('AudioContext.createStereoPanner') | 329 @DomName('AudioContext.createStereoPanner') |
323 @DocsEditable() | 330 @DocsEditable() |
324 @Experimental() // untriaged | 331 @Experimental() // untriaged |
325 StereoPannerNode createStereoPanner() native; | 332 StereoPannerNode createStereoPanner() native ; |
326 | 333 |
327 @DomName('AudioContext.createWaveShaper') | 334 @DomName('AudioContext.createWaveShaper') |
328 @DocsEditable() | 335 @DocsEditable() |
329 WaveShaperNode createWaveShaper() native; | 336 WaveShaperNode createWaveShaper() native ; |
330 | 337 |
331 @JSName('decodeAudioData') | 338 @JSName('decodeAudioData') |
332 @DomName('AudioContext.decodeAudioData') | 339 @DomName('AudioContext.decodeAudioData') |
333 @DocsEditable() | 340 @DocsEditable() |
334 void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallbac
k, [AudioBufferCallback errorCallback]) native; | 341 void _decodeAudioData( |
| 342 ByteBuffer audioData, AudioBufferCallback successCallback, |
| 343 [AudioBufferCallback errorCallback]) native ; |
335 | 344 |
336 @DomName('AudioContext.resume') | 345 @DomName('AudioContext.resume') |
337 @DocsEditable() | 346 @DocsEditable() |
338 @Experimental() // untriaged | 347 @Experimental() // untriaged |
339 Future resume() native; | 348 Future resume() native ; |
340 | 349 |
341 @DomName('AudioContext.suspend') | 350 @DomName('AudioContext.suspend') |
342 @DocsEditable() | 351 @DocsEditable() |
343 @Experimental() // untriaged | 352 @Experimental() // untriaged |
344 Future suspend() native; | 353 Future suspend() native ; |
345 | 354 |
346 factory AudioContext() => JS('AudioContext', | 355 factory AudioContext() => JS('AudioContext', |
347 'new (window.AudioContext || window.webkitAudioContext)()'); | 356 'new (window.AudioContext || window.webkitAudioContext)()'); |
348 | 357 |
349 GainNode createGain() { | 358 GainNode createGain() { |
350 if (JS('bool', '#.createGain !== undefined', this)) { | 359 if (JS('bool', '#.createGain !== undefined', this)) { |
351 return JS('GainNode', '#.createGain()', this); | 360 return JS('GainNode', '#.createGain()', this); |
352 } else { | 361 } else { |
353 return JS('GainNode', '#.createGainNode()', this); | 362 return JS('GainNode', '#.createGainNode()', this); |
354 } | 363 } |
355 } | 364 } |
356 | 365 |
357 ScriptProcessorNode createScriptProcessor(int bufferSize, | 366 ScriptProcessorNode createScriptProcessor(int bufferSize, |
358 [int numberOfInputChannels, int numberOfOutputChannels]) { | 367 [int numberOfInputChannels, int numberOfOutputChannels]) { |
359 var function = JS('=Object', '#.createScriptProcessor || ' | 368 var function = JS( |
360 '#.createJavaScriptNode', this, this); | 369 '=Object', |
| 370 '#.createScriptProcessor || ' |
| 371 '#.createJavaScriptNode', |
| 372 this, |
| 373 this); |
361 if (numberOfOutputChannels != null) { | 374 if (numberOfOutputChannels != null) { |
362 return JS('ScriptProcessorNode', '#.call(#, #, #, #)', function, this, | 375 return JS('ScriptProcessorNode', '#.call(#, #, #, #)', function, this, |
363 bufferSize, numberOfInputChannels, numberOfOutputChannels); | 376 bufferSize, numberOfInputChannels, numberOfOutputChannels); |
364 } else if (numberOfInputChannels != null) { | 377 } else if (numberOfInputChannels != null) { |
365 return JS('ScriptProcessorNode', '#.call(#, #, #)', function, this, | 378 return JS('ScriptProcessorNode', '#.call(#, #, #)', function, this, |
366 bufferSize, numberOfInputChannels); | 379 bufferSize, numberOfInputChannels); |
367 } else { | 380 } else { |
368 return JS('ScriptProcessorNode', '#.call(#, #)', function, this, | 381 return JS( |
369 bufferSize); | 382 'ScriptProcessorNode', '#.call(#, #)', function, this, bufferSize); |
370 } | 383 } |
371 } | 384 } |
| 385 |
372 @DomName('AudioContext.decodeAudioData') | 386 @DomName('AudioContext.decodeAudioData') |
373 Future<AudioBuffer> decodeAudioData(ByteBuffer audioData) { | 387 Future<AudioBuffer> decodeAudioData(ByteBuffer audioData) { |
374 var completer = new Completer<AudioBuffer>(); | 388 var completer = new Completer<AudioBuffer>(); |
375 _decodeAudioData(audioData, | 389 _decodeAudioData(audioData, (value) { |
376 (value) { completer.complete(value); }, | 390 completer.complete(value); |
377 (error) { | 391 }, (error) { |
378 if (error == null) { | 392 if (error == null) { |
379 completer.completeError(''); | 393 completer.completeError(''); |
380 } else { | 394 } else { |
381 completer.completeError(error); | 395 completer.completeError(error); |
382 } | 396 } |
383 }); | 397 }); |
384 return completer.future; | 398 return completer.future; |
385 } | 399 } |
386 } | 400 } |
387 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 401 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
388 // for details. All rights reserved. Use of this source code is governed by a | 402 // for details. All rights reserved. Use of this source code is governed by a |
389 // BSD-style license that can be found in the LICENSE file. | 403 // BSD-style license that can be found in the LICENSE file. |
390 | 404 |
391 | |
392 @DocsEditable() | 405 @DocsEditable() |
393 @DomName('AudioDestinationNode') | 406 @DomName('AudioDestinationNode') |
394 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioDe
stinationNode-section | 407 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioDe
stinationNode-section |
395 @Experimental() | 408 @Experimental() |
396 @Native("AudioDestinationNode") | 409 @Native("AudioDestinationNode") |
397 class AudioDestinationNode extends AudioNode { | 410 class AudioDestinationNode extends AudioNode { |
398 // To suppress missing implicit constructor warnings. | 411 // To suppress missing implicit constructor warnings. |
399 factory AudioDestinationNode._() { throw new UnsupportedError("Not supported")
; } | 412 factory AudioDestinationNode._() { |
| 413 throw new UnsupportedError("Not supported"); |
| 414 } |
400 | 415 |
401 @DomName('AudioDestinationNode.maxChannelCount') | 416 @DomName('AudioDestinationNode.maxChannelCount') |
402 @DocsEditable() | 417 @DocsEditable() |
403 final int maxChannelCount; | 418 final int maxChannelCount; |
404 } | 419 } |
405 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 420 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
406 // for details. All rights reserved. Use of this source code is governed by a | 421 // for details. All rights reserved. Use of this source code is governed by a |
407 // BSD-style license that can be found in the LICENSE file. | 422 // BSD-style license that can be found in the LICENSE file. |
408 | 423 |
409 | |
410 @DocsEditable() | 424 @DocsEditable() |
411 @DomName('AudioListener') | 425 @DomName('AudioListener') |
412 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioLi
stener-section | 426 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioLi
stener-section |
413 @Experimental() | 427 @Experimental() |
414 @Native("AudioListener") | 428 @Native("AudioListener") |
415 class AudioListener extends Interceptor { | 429 class AudioListener extends Interceptor { |
416 // To suppress missing implicit constructor warnings. | 430 // To suppress missing implicit constructor warnings. |
417 factory AudioListener._() { throw new UnsupportedError("Not supported"); } | 431 factory AudioListener._() { |
| 432 throw new UnsupportedError("Not supported"); |
| 433 } |
418 | 434 |
419 @DomName('AudioListener.dopplerFactor') | 435 @DomName('AudioListener.dopplerFactor') |
420 @DocsEditable() | 436 @DocsEditable() |
421 num dopplerFactor; | 437 num dopplerFactor; |
422 | 438 |
423 @DomName('AudioListener.speedOfSound') | 439 @DomName('AudioListener.speedOfSound') |
424 @DocsEditable() | 440 @DocsEditable() |
425 num speedOfSound; | 441 num speedOfSound; |
426 | 442 |
427 @DomName('AudioListener.setOrientation') | 443 @DomName('AudioListener.setOrientation') |
428 @DocsEditable() | 444 @DocsEditable() |
429 void setOrientation(num x, num y, num z, num xUp, num yUp, num zUp) native; | 445 void setOrientation(num x, num y, num z, num xUp, num yUp, num zUp) native ; |
430 | 446 |
431 @DomName('AudioListener.setPosition') | 447 @DomName('AudioListener.setPosition') |
432 @DocsEditable() | 448 @DocsEditable() |
433 void setPosition(num x, num y, num z) native; | 449 void setPosition(num x, num y, num z) native ; |
434 | 450 |
435 @DomName('AudioListener.setVelocity') | 451 @DomName('AudioListener.setVelocity') |
436 @DocsEditable() | 452 @DocsEditable() |
437 void setVelocity(num x, num y, num z) native; | 453 void setVelocity(num x, num y, num z) native ; |
438 } | 454 } |
439 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 455 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
440 // for details. All rights reserved. Use of this source code is governed by a | 456 // for details. All rights reserved. Use of this source code is governed by a |
441 // BSD-style license that can be found in the LICENSE file. | 457 // BSD-style license that can be found in the LICENSE file. |
442 | 458 |
443 | |
444 @DomName('AudioNode') | 459 @DomName('AudioNode') |
445 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioNo
de-section | 460 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioNo
de-section |
446 @Experimental() | 461 @Experimental() |
447 @Native("AudioNode") | 462 @Native("AudioNode") |
448 class AudioNode extends EventTarget { | 463 class AudioNode extends EventTarget { |
449 // To suppress missing implicit constructor warnings. | 464 // To suppress missing implicit constructor warnings. |
450 factory AudioNode._() { throw new UnsupportedError("Not supported"); } | 465 factory AudioNode._() { |
| 466 throw new UnsupportedError("Not supported"); |
| 467 } |
451 | 468 |
452 @DomName('AudioNode.channelCount') | 469 @DomName('AudioNode.channelCount') |
453 @DocsEditable() | 470 @DocsEditable() |
454 int channelCount; | 471 int channelCount; |
455 | 472 |
456 @DomName('AudioNode.channelCountMode') | 473 @DomName('AudioNode.channelCountMode') |
457 @DocsEditable() | 474 @DocsEditable() |
458 String channelCountMode; | 475 String channelCountMode; |
459 | 476 |
460 @DomName('AudioNode.channelInterpretation') | 477 @DomName('AudioNode.channelInterpretation') |
461 @DocsEditable() | 478 @DocsEditable() |
462 String channelInterpretation; | 479 String channelInterpretation; |
463 | 480 |
464 @DomName('AudioNode.context') | 481 @DomName('AudioNode.context') |
465 @DocsEditable() | 482 @DocsEditable() |
466 final AudioContext context; | 483 final AudioContext context; |
467 | 484 |
468 @DomName('AudioNode.numberOfInputs') | 485 @DomName('AudioNode.numberOfInputs') |
469 @DocsEditable() | 486 @DocsEditable() |
470 final int numberOfInputs; | 487 final int numberOfInputs; |
471 | 488 |
472 @DomName('AudioNode.numberOfOutputs') | 489 @DomName('AudioNode.numberOfOutputs') |
473 @DocsEditable() | 490 @DocsEditable() |
474 final int numberOfOutputs; | 491 final int numberOfOutputs; |
475 | 492 |
476 @JSName('connect') | 493 @JSName('connect') |
477 @DomName('AudioNode.connect') | 494 @DomName('AudioNode.connect') |
478 @DocsEditable() | 495 @DocsEditable() |
479 void _connect(destination, [int output, int input]) native; | 496 void _connect(destination, [int output, int input]) native ; |
480 | 497 |
481 @DomName('AudioNode.disconnect') | 498 @DomName('AudioNode.disconnect') |
482 @DocsEditable() | 499 @DocsEditable() |
483 void disconnect([destination_OR_output, int output, int input]) native; | 500 void disconnect([destination_OR_output, int output, int input]) native ; |
484 | 501 |
485 @DomName('AudioNode.connect') | 502 @DomName('AudioNode.connect') |
486 void connectNode(AudioNode destination, [int output = 0, int input = 0]) { | 503 void connectNode(AudioNode destination, [int output = 0, int input = 0]) { |
487 _connect(destination, output, input); | 504 _connect(destination, output, input); |
488 } | 505 } |
489 | 506 |
490 @DomName('AudioNode.connect') | 507 @DomName('AudioNode.connect') |
491 void connectParam(AudioParam destination, [int output = 0]) { | 508 void connectParam(AudioParam destination, [int output = 0]) { |
492 _connect(destination, output); | 509 _connect(destination, output); |
493 } | 510 } |
494 } | 511 } |
495 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 512 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
496 // for details. All rights reserved. Use of this source code is governed by a | 513 // for details. All rights reserved. Use of this source code is governed by a |
497 // BSD-style license that can be found in the LICENSE file. | 514 // BSD-style license that can be found in the LICENSE file. |
498 | 515 |
499 | |
500 @DocsEditable() | 516 @DocsEditable() |
501 @DomName('AudioParam') | 517 @DomName('AudioParam') |
502 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPa
ram | 518 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPa
ram |
503 @Experimental() | 519 @Experimental() |
504 @Native("AudioParam") | 520 @Native("AudioParam") |
505 class AudioParam extends Interceptor { | 521 class AudioParam extends Interceptor { |
506 // To suppress missing implicit constructor warnings. | 522 // To suppress missing implicit constructor warnings. |
507 factory AudioParam._() { throw new UnsupportedError("Not supported"); } | 523 factory AudioParam._() { |
| 524 throw new UnsupportedError("Not supported"); |
| 525 } |
508 | 526 |
509 @DomName('AudioParam.defaultValue') | 527 @DomName('AudioParam.defaultValue') |
510 @DocsEditable() | 528 @DocsEditable() |
511 final double defaultValue; | 529 final double defaultValue; |
512 | 530 |
513 @DomName('AudioParam.value') | 531 @DomName('AudioParam.value') |
514 @DocsEditable() | 532 @DocsEditable() |
515 num value; | 533 num value; |
516 | 534 |
517 @DomName('AudioParam.cancelScheduledValues') | 535 @DomName('AudioParam.cancelScheduledValues') |
518 @DocsEditable() | 536 @DocsEditable() |
519 void cancelScheduledValues(num startTime) native; | 537 void cancelScheduledValues(num startTime) native ; |
520 | 538 |
521 @DomName('AudioParam.exponentialRampToValueAtTime') | 539 @DomName('AudioParam.exponentialRampToValueAtTime') |
522 @DocsEditable() | 540 @DocsEditable() |
523 void exponentialRampToValueAtTime(num value, num time) native; | 541 void exponentialRampToValueAtTime(num value, num time) native ; |
524 | 542 |
525 @DomName('AudioParam.linearRampToValueAtTime') | 543 @DomName('AudioParam.linearRampToValueAtTime') |
526 @DocsEditable() | 544 @DocsEditable() |
527 void linearRampToValueAtTime(num value, num time) native; | 545 void linearRampToValueAtTime(num value, num time) native ; |
528 | 546 |
529 @DomName('AudioParam.setTargetAtTime') | 547 @DomName('AudioParam.setTargetAtTime') |
530 @DocsEditable() | 548 @DocsEditable() |
531 void setTargetAtTime(num target, num time, num timeConstant) native; | 549 void setTargetAtTime(num target, num time, num timeConstant) native ; |
532 | 550 |
533 @DomName('AudioParam.setValueAtTime') | 551 @DomName('AudioParam.setValueAtTime') |
534 @DocsEditable() | 552 @DocsEditable() |
535 void setValueAtTime(num value, num time) native; | 553 void setValueAtTime(num value, num time) native ; |
536 | 554 |
537 @DomName('AudioParam.setValueCurveAtTime') | 555 @DomName('AudioParam.setValueCurveAtTime') |
538 @DocsEditable() | 556 @DocsEditable() |
539 void setValueCurveAtTime(Float32List values, num time, num duration) native; | 557 void setValueCurveAtTime(Float32List values, num time, num duration) native ; |
540 } | 558 } |
541 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 559 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
542 // for details. All rights reserved. Use of this source code is governed by a | 560 // for details. All rights reserved. Use of this source code is governed by a |
543 // BSD-style license that can be found in the LICENSE file. | 561 // BSD-style license that can be found in the LICENSE file. |
544 | 562 |
545 | |
546 @DocsEditable() | 563 @DocsEditable() |
547 @DomName('AudioProcessingEvent') | 564 @DomName('AudioProcessingEvent') |
548 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPr
ocessingEvent-section | 565 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPr
ocessingEvent-section |
549 @Experimental() | 566 @Experimental() |
550 @Native("AudioProcessingEvent") | 567 @Native("AudioProcessingEvent") |
551 class AudioProcessingEvent extends Event { | 568 class AudioProcessingEvent extends Event { |
552 // To suppress missing implicit constructor warnings. | 569 // To suppress missing implicit constructor warnings. |
553 factory AudioProcessingEvent._() { throw new UnsupportedError("Not supported")
; } | 570 factory AudioProcessingEvent._() { |
| 571 throw new UnsupportedError("Not supported"); |
| 572 } |
554 | 573 |
555 @DomName('AudioProcessingEvent.inputBuffer') | 574 @DomName('AudioProcessingEvent.inputBuffer') |
556 @DocsEditable() | 575 @DocsEditable() |
557 final AudioBuffer inputBuffer; | 576 final AudioBuffer inputBuffer; |
558 | 577 |
559 @DomName('AudioProcessingEvent.outputBuffer') | 578 @DomName('AudioProcessingEvent.outputBuffer') |
560 @DocsEditable() | 579 @DocsEditable() |
561 final AudioBuffer outputBuffer; | 580 final AudioBuffer outputBuffer; |
562 | 581 |
563 @DomName('AudioProcessingEvent.playbackTime') | 582 @DomName('AudioProcessingEvent.playbackTime') |
564 @DocsEditable() | 583 @DocsEditable() |
565 @Experimental() // untriaged | 584 @Experimental() // untriaged |
566 final double playbackTime; | 585 final double playbackTime; |
567 } | 586 } |
568 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 587 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
569 // for details. All rights reserved. Use of this source code is governed by a | 588 // for details. All rights reserved. Use of this source code is governed by a |
570 // BSD-style license that can be found in the LICENSE file. | 589 // BSD-style license that can be found in the LICENSE file. |
571 | 590 |
572 | |
573 @DocsEditable() | 591 @DocsEditable() |
574 @DomName('AudioSourceNode') | 592 @DomName('AudioSourceNode') |
575 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html | 593 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html |
576 @Experimental() | 594 @Experimental() |
577 @Native("AudioSourceNode") | 595 @Native("AudioSourceNode") |
578 class AudioSourceNode extends AudioNode { | 596 class AudioSourceNode extends AudioNode { |
579 // To suppress missing implicit constructor warnings. | 597 // To suppress missing implicit constructor warnings. |
580 factory AudioSourceNode._() { throw new UnsupportedError("Not supported"); } | 598 factory AudioSourceNode._() { |
| 599 throw new UnsupportedError("Not supported"); |
| 600 } |
581 } | 601 } |
582 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 602 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
583 // for details. All rights reserved. Use of this source code is governed by a | 603 // for details. All rights reserved. Use of this source code is governed by a |
584 // BSD-style license that can be found in the LICENSE file. | 604 // BSD-style license that can be found in the LICENSE file. |
585 | 605 |
586 | |
587 @DocsEditable() | 606 @DocsEditable() |
588 @DomName('BiquadFilterNode') | 607 @DomName('BiquadFilterNode') |
589 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#BiquadF
ilterNode-section | 608 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#BiquadF
ilterNode-section |
590 @Experimental() | 609 @Experimental() |
591 @Native("BiquadFilterNode") | 610 @Native("BiquadFilterNode") |
592 class BiquadFilterNode extends AudioNode { | 611 class BiquadFilterNode extends AudioNode { |
593 // To suppress missing implicit constructor warnings. | 612 // To suppress missing implicit constructor warnings. |
594 factory BiquadFilterNode._() { throw new UnsupportedError("Not supported"); } | 613 factory BiquadFilterNode._() { |
| 614 throw new UnsupportedError("Not supported"); |
| 615 } |
595 | 616 |
596 @DomName('BiquadFilterNode.Q') | 617 @DomName('BiquadFilterNode.Q') |
597 @DocsEditable() | 618 @DocsEditable() |
598 final AudioParam Q; | 619 final AudioParam Q; |
599 | 620 |
600 @DomName('BiquadFilterNode.detune') | 621 @DomName('BiquadFilterNode.detune') |
601 @DocsEditable() | 622 @DocsEditable() |
602 final AudioParam detune; | 623 final AudioParam detune; |
603 | 624 |
604 @DomName('BiquadFilterNode.frequency') | 625 @DomName('BiquadFilterNode.frequency') |
605 @DocsEditable() | 626 @DocsEditable() |
606 final AudioParam frequency; | 627 final AudioParam frequency; |
607 | 628 |
608 @DomName('BiquadFilterNode.gain') | 629 @DomName('BiquadFilterNode.gain') |
609 @DocsEditable() | 630 @DocsEditable() |
610 final AudioParam gain; | 631 final AudioParam gain; |
611 | 632 |
612 @DomName('BiquadFilterNode.type') | 633 @DomName('BiquadFilterNode.type') |
613 @DocsEditable() | 634 @DocsEditable() |
614 String type; | 635 String type; |
615 | 636 |
616 @DomName('BiquadFilterNode.getFrequencyResponse') | 637 @DomName('BiquadFilterNode.getFrequencyResponse') |
617 @DocsEditable() | 638 @DocsEditable() |
618 void getFrequencyResponse(Float32List frequencyHz, Float32List magResponse, Fl
oat32List phaseResponse) native; | 639 void getFrequencyResponse(Float32List frequencyHz, Float32List magResponse, |
| 640 Float32List phaseResponse) native ; |
619 } | 641 } |
620 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 642 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
621 // for details. All rights reserved. Use of this source code is governed by a | 643 // for details. All rights reserved. Use of this source code is governed by a |
622 // BSD-style license that can be found in the LICENSE file. | 644 // BSD-style license that can be found in the LICENSE file. |
623 | 645 |
624 | |
625 @DocsEditable() | 646 @DocsEditable() |
626 @DomName('ChannelMergerNode') | 647 @DomName('ChannelMergerNode') |
627 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Channel
MergerNode-section | 648 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Channel
MergerNode-section |
628 @Experimental() | 649 @Experimental() |
629 @Native("ChannelMergerNode,AudioChannelMerger") | 650 @Native("ChannelMergerNode,AudioChannelMerger") |
630 class ChannelMergerNode extends AudioNode { | 651 class ChannelMergerNode extends AudioNode { |
631 // To suppress missing implicit constructor warnings. | 652 // To suppress missing implicit constructor warnings. |
632 factory ChannelMergerNode._() { throw new UnsupportedError("Not supported"); } | 653 factory ChannelMergerNode._() { |
| 654 throw new UnsupportedError("Not supported"); |
| 655 } |
633 } | 656 } |
634 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 657 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
635 // for details. All rights reserved. Use of this source code is governed by a | 658 // for details. All rights reserved. Use of this source code is governed by a |
636 // BSD-style license that can be found in the LICENSE file. | 659 // BSD-style license that can be found in the LICENSE file. |
637 | 660 |
638 | |
639 @DocsEditable() | 661 @DocsEditable() |
640 @DomName('ChannelSplitterNode') | 662 @DomName('ChannelSplitterNode') |
641 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Channel
SplitterNode-section | 663 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Channel
SplitterNode-section |
642 @Experimental() | 664 @Experimental() |
643 @Native("ChannelSplitterNode,AudioChannelSplitter") | 665 @Native("ChannelSplitterNode,AudioChannelSplitter") |
644 class ChannelSplitterNode extends AudioNode { | 666 class ChannelSplitterNode extends AudioNode { |
645 // To suppress missing implicit constructor warnings. | 667 // To suppress missing implicit constructor warnings. |
646 factory ChannelSplitterNode._() { throw new UnsupportedError("Not supported");
} | 668 factory ChannelSplitterNode._() { |
| 669 throw new UnsupportedError("Not supported"); |
| 670 } |
647 } | 671 } |
648 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 672 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
649 // for details. All rights reserved. Use of this source code is governed by a | 673 // for details. All rights reserved. Use of this source code is governed by a |
650 // BSD-style license that can be found in the LICENSE file. | 674 // BSD-style license that can be found in the LICENSE file. |
651 | 675 |
652 | |
653 @DocsEditable() | 676 @DocsEditable() |
654 @DomName('ConvolverNode') | 677 @DomName('ConvolverNode') |
655 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Convolv
erNode | 678 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Convolv
erNode |
656 @Experimental() | 679 @Experimental() |
657 @Native("ConvolverNode") | 680 @Native("ConvolverNode") |
658 class ConvolverNode extends AudioNode { | 681 class ConvolverNode extends AudioNode { |
659 // To suppress missing implicit constructor warnings. | 682 // To suppress missing implicit constructor warnings. |
660 factory ConvolverNode._() { throw new UnsupportedError("Not supported"); } | 683 factory ConvolverNode._() { |
| 684 throw new UnsupportedError("Not supported"); |
| 685 } |
661 | 686 |
662 @DomName('ConvolverNode.buffer') | 687 @DomName('ConvolverNode.buffer') |
663 @DocsEditable() | 688 @DocsEditable() |
664 AudioBuffer buffer; | 689 AudioBuffer buffer; |
665 | 690 |
666 @DomName('ConvolverNode.normalize') | 691 @DomName('ConvolverNode.normalize') |
667 @DocsEditable() | 692 @DocsEditable() |
668 bool normalize; | 693 bool normalize; |
669 } | 694 } |
670 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 695 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
671 // for details. All rights reserved. Use of this source code is governed by a | 696 // for details. All rights reserved. Use of this source code is governed by a |
672 // BSD-style license that can be found in the LICENSE file. | 697 // BSD-style license that can be found in the LICENSE file. |
673 | 698 |
674 | |
675 @DocsEditable() | 699 @DocsEditable() |
676 @DomName('DelayNode') | 700 @DomName('DelayNode') |
677 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#DelayNo
de | 701 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#DelayNo
de |
678 @Experimental() | 702 @Experimental() |
679 @Native("DelayNode") | 703 @Native("DelayNode") |
680 class DelayNode extends AudioNode { | 704 class DelayNode extends AudioNode { |
681 // To suppress missing implicit constructor warnings. | 705 // To suppress missing implicit constructor warnings. |
682 factory DelayNode._() { throw new UnsupportedError("Not supported"); } | 706 factory DelayNode._() { |
| 707 throw new UnsupportedError("Not supported"); |
| 708 } |
683 | 709 |
684 @DomName('DelayNode.delayTime') | 710 @DomName('DelayNode.delayTime') |
685 @DocsEditable() | 711 @DocsEditable() |
686 final AudioParam delayTime; | 712 final AudioParam delayTime; |
687 } | 713 } |
688 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 714 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
689 // for details. All rights reserved. Use of this source code is governed by a | 715 // for details. All rights reserved. Use of this source code is governed by a |
690 // BSD-style license that can be found in the LICENSE file. | 716 // BSD-style license that can be found in the LICENSE file. |
691 | 717 |
692 | |
693 @DocsEditable() | 718 @DocsEditable() |
694 @DomName('DynamicsCompressorNode') | 719 @DomName('DynamicsCompressorNode') |
695 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Dynamic
sCompressorNode | 720 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Dynamic
sCompressorNode |
696 @Experimental() | 721 @Experimental() |
697 @Native("DynamicsCompressorNode") | 722 @Native("DynamicsCompressorNode") |
698 class DynamicsCompressorNode extends AudioNode { | 723 class DynamicsCompressorNode extends AudioNode { |
699 // To suppress missing implicit constructor warnings. | 724 // To suppress missing implicit constructor warnings. |
700 factory DynamicsCompressorNode._() { throw new UnsupportedError("Not supported
"); } | 725 factory DynamicsCompressorNode._() { |
| 726 throw new UnsupportedError("Not supported"); |
| 727 } |
701 | 728 |
702 @DomName('DynamicsCompressorNode.attack') | 729 @DomName('DynamicsCompressorNode.attack') |
703 @DocsEditable() | 730 @DocsEditable() |
704 final AudioParam attack; | 731 final AudioParam attack; |
705 | 732 |
706 @DomName('DynamicsCompressorNode.knee') | 733 @DomName('DynamicsCompressorNode.knee') |
707 @DocsEditable() | 734 @DocsEditable() |
708 final AudioParam knee; | 735 final AudioParam knee; |
709 | 736 |
710 @DomName('DynamicsCompressorNode.ratio') | 737 @DomName('DynamicsCompressorNode.ratio') |
711 @DocsEditable() | 738 @DocsEditable() |
712 final AudioParam ratio; | 739 final AudioParam ratio; |
713 | 740 |
714 @DomName('DynamicsCompressorNode.reduction') | 741 @DomName('DynamicsCompressorNode.reduction') |
715 @DocsEditable() | 742 @DocsEditable() |
716 final AudioParam reduction; | 743 final AudioParam reduction; |
717 | 744 |
718 @DomName('DynamicsCompressorNode.release') | 745 @DomName('DynamicsCompressorNode.release') |
719 @DocsEditable() | 746 @DocsEditable() |
720 final AudioParam release; | 747 final AudioParam release; |
721 | 748 |
722 @DomName('DynamicsCompressorNode.threshold') | 749 @DomName('DynamicsCompressorNode.threshold') |
723 @DocsEditable() | 750 @DocsEditable() |
724 final AudioParam threshold; | 751 final AudioParam threshold; |
725 } | 752 } |
726 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 753 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
727 // for details. All rights reserved. Use of this source code is governed by a | 754 // for details. All rights reserved. Use of this source code is governed by a |
728 // BSD-style license that can be found in the LICENSE file. | 755 // BSD-style license that can be found in the LICENSE file. |
729 | 756 |
730 | |
731 @DocsEditable() | 757 @DocsEditable() |
732 @DomName('GainNode') | 758 @DomName('GainNode') |
733 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#GainNod
e | 759 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#GainNod
e |
734 @Experimental() | 760 @Experimental() |
735 @Native("GainNode,AudioGainNode") | 761 @Native("GainNode,AudioGainNode") |
736 class GainNode extends AudioNode { | 762 class GainNode extends AudioNode { |
737 // To suppress missing implicit constructor warnings. | 763 // To suppress missing implicit constructor warnings. |
738 factory GainNode._() { throw new UnsupportedError("Not supported"); } | 764 factory GainNode._() { |
| 765 throw new UnsupportedError("Not supported"); |
| 766 } |
739 | 767 |
740 @DomName('GainNode.gain') | 768 @DomName('GainNode.gain') |
741 @DocsEditable() | 769 @DocsEditable() |
742 final AudioParam gain; | 770 final AudioParam gain; |
743 } | 771 } |
744 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 772 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
745 // for details. All rights reserved. Use of this source code is governed by a | 773 // for details. All rights reserved. Use of this source code is governed by a |
746 // BSD-style license that can be found in the LICENSE file. | 774 // BSD-style license that can be found in the LICENSE file. |
747 | 775 |
748 | |
749 @DocsEditable() | 776 @DocsEditable() |
750 @DomName('MediaElementAudioSourceNode') | 777 @DomName('MediaElementAudioSourceNode') |
751 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaEl
ementAudioSourceNode | 778 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaEl
ementAudioSourceNode |
752 @Experimental() | 779 @Experimental() |
753 @Native("MediaElementAudioSourceNode") | 780 @Native("MediaElementAudioSourceNode") |
754 class MediaElementAudioSourceNode extends AudioSourceNode { | 781 class MediaElementAudioSourceNode extends AudioSourceNode { |
755 // To suppress missing implicit constructor warnings. | 782 // To suppress missing implicit constructor warnings. |
756 factory MediaElementAudioSourceNode._() { throw new UnsupportedError("Not supp
orted"); } | 783 factory MediaElementAudioSourceNode._() { |
| 784 throw new UnsupportedError("Not supported"); |
| 785 } |
757 | 786 |
758 @DomName('MediaElementAudioSourceNode.mediaElement') | 787 @DomName('MediaElementAudioSourceNode.mediaElement') |
759 @DocsEditable() | 788 @DocsEditable() |
760 @Experimental() // non-standard | 789 @Experimental() // non-standard |
761 final MediaElement mediaElement; | 790 final MediaElement mediaElement; |
762 } | 791 } |
763 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 792 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
764 // for details. All rights reserved. Use of this source code is governed by a | 793 // for details. All rights reserved. Use of this source code is governed by a |
765 // BSD-style license that can be found in the LICENSE file. | 794 // BSD-style license that can be found in the LICENSE file. |
766 | 795 |
767 | |
768 @DocsEditable() | 796 @DocsEditable() |
769 @DomName('MediaStreamAudioDestinationNode') | 797 @DomName('MediaStreamAudioDestinationNode') |
770 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaSt
reamAudioDestinationNode | 798 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaSt
reamAudioDestinationNode |
771 @Experimental() | 799 @Experimental() |
772 @Native("MediaStreamAudioDestinationNode") | 800 @Native("MediaStreamAudioDestinationNode") |
773 class MediaStreamAudioDestinationNode extends AudioNode { | 801 class MediaStreamAudioDestinationNode extends AudioNode { |
774 // To suppress missing implicit constructor warnings. | 802 // To suppress missing implicit constructor warnings. |
775 factory MediaStreamAudioDestinationNode._() { throw new UnsupportedError("Not
supported"); } | 803 factory MediaStreamAudioDestinationNode._() { |
| 804 throw new UnsupportedError("Not supported"); |
| 805 } |
776 | 806 |
777 @DomName('MediaStreamAudioDestinationNode.stream') | 807 @DomName('MediaStreamAudioDestinationNode.stream') |
778 @DocsEditable() | 808 @DocsEditable() |
779 final MediaStream stream; | 809 final MediaStream stream; |
780 } | 810 } |
781 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 811 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
782 // for details. All rights reserved. Use of this source code is governed by a | 812 // for details. All rights reserved. Use of this source code is governed by a |
783 // BSD-style license that can be found in the LICENSE file. | 813 // BSD-style license that can be found in the LICENSE file. |
784 | 814 |
785 | |
786 @DocsEditable() | 815 @DocsEditable() |
787 @DomName('MediaStreamAudioSourceNode') | 816 @DomName('MediaStreamAudioSourceNode') |
788 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaSt
reamAudioSourceNode | 817 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaSt
reamAudioSourceNode |
789 @Experimental() | 818 @Experimental() |
790 @Native("MediaStreamAudioSourceNode") | 819 @Native("MediaStreamAudioSourceNode") |
791 class MediaStreamAudioSourceNode extends AudioSourceNode { | 820 class MediaStreamAudioSourceNode extends AudioSourceNode { |
792 // To suppress missing implicit constructor warnings. | 821 // To suppress missing implicit constructor warnings. |
793 factory MediaStreamAudioSourceNode._() { throw new UnsupportedError("Not suppo
rted"); } | 822 factory MediaStreamAudioSourceNode._() { |
| 823 throw new UnsupportedError("Not supported"); |
| 824 } |
794 | 825 |
795 @DomName('MediaStreamAudioSourceNode.mediaStream') | 826 @DomName('MediaStreamAudioSourceNode.mediaStream') |
796 @DocsEditable() | 827 @DocsEditable() |
797 final MediaStream mediaStream; | 828 final MediaStream mediaStream; |
798 } | 829 } |
799 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 830 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
800 // for details. All rights reserved. Use of this source code is governed by a | 831 // for details. All rights reserved. Use of this source code is governed by a |
801 // BSD-style license that can be found in the LICENSE file. | 832 // BSD-style license that can be found in the LICENSE file. |
802 | 833 |
803 | |
804 @DocsEditable() | 834 @DocsEditable() |
805 @DomName('OfflineAudioCompletionEvent') | 835 @DomName('OfflineAudioCompletionEvent') |
806 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Offline
AudioCompletionEvent-section | 836 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Offline
AudioCompletionEvent-section |
807 @Experimental() | 837 @Experimental() |
808 @Native("OfflineAudioCompletionEvent") | 838 @Native("OfflineAudioCompletionEvent") |
809 class OfflineAudioCompletionEvent extends Event { | 839 class OfflineAudioCompletionEvent extends Event { |
810 // To suppress missing implicit constructor warnings. | 840 // To suppress missing implicit constructor warnings. |
811 factory OfflineAudioCompletionEvent._() { throw new UnsupportedError("Not supp
orted"); } | 841 factory OfflineAudioCompletionEvent._() { |
| 842 throw new UnsupportedError("Not supported"); |
| 843 } |
812 | 844 |
813 @DomName('OfflineAudioCompletionEvent.renderedBuffer') | 845 @DomName('OfflineAudioCompletionEvent.renderedBuffer') |
814 @DocsEditable() | 846 @DocsEditable() |
815 final AudioBuffer renderedBuffer; | 847 final AudioBuffer renderedBuffer; |
816 } | 848 } |
817 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 849 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
818 // for details. All rights reserved. Use of this source code is governed by a | 850 // for details. All rights reserved. Use of this source code is governed by a |
819 // BSD-style license that can be found in the LICENSE file. | 851 // BSD-style license that can be found in the LICENSE file. |
820 | 852 |
821 | |
822 @DocsEditable() | 853 @DocsEditable() |
823 @DomName('OfflineAudioContext') | 854 @DomName('OfflineAudioContext') |
824 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Offline
AudioContext-section | 855 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Offline
AudioContext-section |
825 @Experimental() | 856 @Experimental() |
826 @Native("OfflineAudioContext") | 857 @Native("OfflineAudioContext") |
827 class OfflineAudioContext extends AudioContext { | 858 class OfflineAudioContext extends AudioContext { |
828 // To suppress missing implicit constructor warnings. | 859 // To suppress missing implicit constructor warnings. |
829 factory OfflineAudioContext._() { throw new UnsupportedError("Not supported");
} | 860 factory OfflineAudioContext._() { |
| 861 throw new UnsupportedError("Not supported"); |
| 862 } |
830 | 863 |
831 @DomName('OfflineAudioContext.OfflineAudioContext') | 864 @DomName('OfflineAudioContext.OfflineAudioContext') |
832 @DocsEditable() | 865 @DocsEditable() |
833 factory OfflineAudioContext(int numberOfChannels, int numberOfFrames, num samp
leRate) { | 866 factory OfflineAudioContext( |
834 return OfflineAudioContext._create_1(numberOfChannels, numberOfFrames, sampl
eRate); | 867 int numberOfChannels, int numberOfFrames, num sampleRate) { |
| 868 return OfflineAudioContext._create_1( |
| 869 numberOfChannels, numberOfFrames, sampleRate); |
835 } | 870 } |
836 static OfflineAudioContext _create_1(numberOfChannels, numberOfFrames, sampleR
ate) => JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)', numberOfChan
nels, numberOfFrames, sampleRate); | 871 static OfflineAudioContext _create_1( |
| 872 numberOfChannels, numberOfFrames, sampleRate) => |
| 873 JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)', |
| 874 numberOfChannels, numberOfFrames, sampleRate); |
837 | 875 |
838 @DomName('OfflineAudioContext.startRendering') | 876 @DomName('OfflineAudioContext.startRendering') |
839 @DocsEditable() | 877 @DocsEditable() |
840 @Experimental() // untriaged | 878 @Experimental() // untriaged |
841 Future startRendering() native; | 879 Future startRendering() native ; |
842 } | 880 } |
843 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 881 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
844 // for details. All rights reserved. Use of this source code is governed by a | 882 // for details. All rights reserved. Use of this source code is governed by a |
845 // BSD-style license that can be found in the LICENSE file. | 883 // BSD-style license that can be found in the LICENSE file. |
846 | 884 |
847 | |
848 @DocsEditable() | 885 @DocsEditable() |
849 @DomName('OscillatorNode') | 886 @DomName('OscillatorNode') |
850 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Osc
illatorNode | 887 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Osc
illatorNode |
851 @Experimental() | 888 @Experimental() |
852 @Native("OscillatorNode,Oscillator") | 889 @Native("OscillatorNode,Oscillator") |
853 class OscillatorNode extends AudioSourceNode { | 890 class OscillatorNode extends AudioSourceNode { |
854 // To suppress missing implicit constructor warnings. | 891 // To suppress missing implicit constructor warnings. |
855 factory OscillatorNode._() { throw new UnsupportedError("Not supported"); } | 892 factory OscillatorNode._() { |
| 893 throw new UnsupportedError("Not supported"); |
| 894 } |
856 | 895 |
857 /** | 896 /** |
858 * Static factory designed to expose `ended` events to event | 897 * Static factory designed to expose `ended` events to event |
859 * handlers that are not necessarily instances of [OscillatorNode]. | 898 * handlers that are not necessarily instances of [OscillatorNode]. |
860 * | 899 * |
861 * See [EventStreamProvider] for usage information. | 900 * See [EventStreamProvider] for usage information. |
862 */ | 901 */ |
863 @DomName('OscillatorNode.endedEvent') | 902 @DomName('OscillatorNode.endedEvent') |
864 @DocsEditable() | 903 @DocsEditable() |
865 @Experimental() // untriaged | 904 @Experimental() // untriaged |
866 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider
<Event>('ended'); | 905 static const EventStreamProvider<Event> endedEvent = |
| 906 const EventStreamProvider<Event>('ended'); |
867 | 907 |
868 @DomName('OscillatorNode.detune') | 908 @DomName('OscillatorNode.detune') |
869 @DocsEditable() | 909 @DocsEditable() |
870 final AudioParam detune; | 910 final AudioParam detune; |
871 | 911 |
872 @DomName('OscillatorNode.frequency') | 912 @DomName('OscillatorNode.frequency') |
873 @DocsEditable() | 913 @DocsEditable() |
874 final AudioParam frequency; | 914 final AudioParam frequency; |
875 | 915 |
876 @DomName('OscillatorNode.type') | 916 @DomName('OscillatorNode.type') |
877 @DocsEditable() | 917 @DocsEditable() |
878 String type; | 918 String type; |
879 | 919 |
880 @DomName('OscillatorNode.setPeriodicWave') | 920 @DomName('OscillatorNode.setPeriodicWave') |
881 @DocsEditable() | 921 @DocsEditable() |
882 @Experimental() // untriaged | 922 @Experimental() // untriaged |
883 void setPeriodicWave(PeriodicWave periodicWave) native; | 923 void setPeriodicWave(PeriodicWave periodicWave) native ; |
884 | 924 |
885 @DomName('OscillatorNode.start') | 925 @DomName('OscillatorNode.start') |
886 @DocsEditable() | 926 @DocsEditable() |
887 void start([num when]) native; | 927 void start([num when]) native ; |
888 | 928 |
889 @DomName('OscillatorNode.stop') | 929 @DomName('OscillatorNode.stop') |
890 @DocsEditable() | 930 @DocsEditable() |
891 void stop([num when]) native; | 931 void stop([num when]) native ; |
892 | 932 |
893 /// Stream of `ended` events handled by this [OscillatorNode]. | 933 /// Stream of `ended` events handled by this [OscillatorNode]. |
894 @DomName('OscillatorNode.onended') | 934 @DomName('OscillatorNode.onended') |
895 @DocsEditable() | 935 @DocsEditable() |
896 @Experimental() // untriaged | 936 @Experimental() // untriaged |
897 Stream<Event> get onEnded => endedEvent.forTarget(this); | 937 Stream<Event> get onEnded => endedEvent.forTarget(this); |
898 } | 938 } |
899 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 939 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
900 // for details. All rights reserved. Use of this source code is governed by a | 940 // for details. All rights reserved. Use of this source code is governed by a |
901 // BSD-style license that can be found in the LICENSE file. | 941 // BSD-style license that can be found in the LICENSE file. |
902 | 942 |
903 | |
904 @DocsEditable() | 943 @DocsEditable() |
905 @DomName('PannerNode') | 944 @DomName('PannerNode') |
906 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#PannerN
ode | 945 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#PannerN
ode |
907 @Experimental() | 946 @Experimental() |
908 @Native("PannerNode,AudioPannerNode,webkitAudioPannerNode") | 947 @Native("PannerNode,AudioPannerNode,webkitAudioPannerNode") |
909 class PannerNode extends AudioNode { | 948 class PannerNode extends AudioNode { |
910 // To suppress missing implicit constructor warnings. | 949 // To suppress missing implicit constructor warnings. |
911 factory PannerNode._() { throw new UnsupportedError("Not supported"); } | 950 factory PannerNode._() { |
| 951 throw new UnsupportedError("Not supported"); |
| 952 } |
912 | 953 |
913 @DomName('PannerNode.coneInnerAngle') | 954 @DomName('PannerNode.coneInnerAngle') |
914 @DocsEditable() | 955 @DocsEditable() |
915 num coneInnerAngle; | 956 num coneInnerAngle; |
916 | 957 |
917 @DomName('PannerNode.coneOuterAngle') | 958 @DomName('PannerNode.coneOuterAngle') |
918 @DocsEditable() | 959 @DocsEditable() |
919 num coneOuterAngle; | 960 num coneOuterAngle; |
920 | 961 |
921 @DomName('PannerNode.coneOuterGain') | 962 @DomName('PannerNode.coneOuterGain') |
(...skipping 15 matching lines...) Expand all Loading... |
937 @DomName('PannerNode.refDistance') | 978 @DomName('PannerNode.refDistance') |
938 @DocsEditable() | 979 @DocsEditable() |
939 num refDistance; | 980 num refDistance; |
940 | 981 |
941 @DomName('PannerNode.rolloffFactor') | 982 @DomName('PannerNode.rolloffFactor') |
942 @DocsEditable() | 983 @DocsEditable() |
943 num rolloffFactor; | 984 num rolloffFactor; |
944 | 985 |
945 @DomName('PannerNode.setOrientation') | 986 @DomName('PannerNode.setOrientation') |
946 @DocsEditable() | 987 @DocsEditable() |
947 void setOrientation(num x, num y, num z) native; | 988 void setOrientation(num x, num y, num z) native ; |
948 | 989 |
949 @DomName('PannerNode.setPosition') | 990 @DomName('PannerNode.setPosition') |
950 @DocsEditable() | 991 @DocsEditable() |
951 void setPosition(num x, num y, num z) native; | 992 void setPosition(num x, num y, num z) native ; |
952 | 993 |
953 @DomName('PannerNode.setVelocity') | 994 @DomName('PannerNode.setVelocity') |
954 @DocsEditable() | 995 @DocsEditable() |
955 void setVelocity(num x, num y, num z) native; | 996 void setVelocity(num x, num y, num z) native ; |
956 } | 997 } |
957 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 998 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
958 // for details. All rights reserved. Use of this source code is governed by a | 999 // for details. All rights reserved. Use of this source code is governed by a |
959 // BSD-style license that can be found in the LICENSE file. | 1000 // BSD-style license that can be found in the LICENSE file. |
960 | 1001 |
961 | |
962 @DocsEditable() | 1002 @DocsEditable() |
963 @DomName('PeriodicWave') | 1003 @DomName('PeriodicWave') |
964 @Experimental() // untriaged | 1004 @Experimental() // untriaged |
965 @Native("PeriodicWave") | 1005 @Native("PeriodicWave") |
966 class PeriodicWave extends Interceptor { | 1006 class PeriodicWave extends Interceptor { |
967 // To suppress missing implicit constructor warnings. | 1007 // To suppress missing implicit constructor warnings. |
968 factory PeriodicWave._() { throw new UnsupportedError("Not supported"); } | 1008 factory PeriodicWave._() { |
| 1009 throw new UnsupportedError("Not supported"); |
| 1010 } |
969 } | 1011 } |
970 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1012 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
971 // for details. All rights reserved. Use of this source code is governed by a | 1013 // for details. All rights reserved. Use of this source code is governed by a |
972 // BSD-style license that can be found in the LICENSE file. | 1014 // BSD-style license that can be found in the LICENSE file. |
973 | 1015 |
974 | |
975 @DocsEditable() | 1016 @DocsEditable() |
976 @DomName('ScriptProcessorNode') | 1017 @DomName('ScriptProcessorNode') |
977 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ScriptP
rocessorNode | 1018 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ScriptP
rocessorNode |
978 @Experimental() | 1019 @Experimental() |
979 @Native("ScriptProcessorNode,JavaScriptAudioNode") | 1020 @Native("ScriptProcessorNode,JavaScriptAudioNode") |
980 class ScriptProcessorNode extends AudioNode { | 1021 class ScriptProcessorNode extends AudioNode { |
981 // To suppress missing implicit constructor warnings. | 1022 // To suppress missing implicit constructor warnings. |
982 factory ScriptProcessorNode._() { throw new UnsupportedError("Not supported");
} | 1023 factory ScriptProcessorNode._() { |
| 1024 throw new UnsupportedError("Not supported"); |
| 1025 } |
983 | 1026 |
984 /** | 1027 /** |
985 * Static factory designed to expose `audioprocess` events to event | 1028 * Static factory designed to expose `audioprocess` events to event |
986 * handlers that are not necessarily instances of [ScriptProcessorNode]. | 1029 * handlers that are not necessarily instances of [ScriptProcessorNode]. |
987 * | 1030 * |
988 * See [EventStreamProvider] for usage information. | 1031 * See [EventStreamProvider] for usage information. |
989 */ | 1032 */ |
990 @DomName('ScriptProcessorNode.audioprocessEvent') | 1033 @DomName('ScriptProcessorNode.audioprocessEvent') |
991 @DocsEditable() | 1034 @DocsEditable() |
992 @Experimental() // untriaged | 1035 @Experimental() // untriaged |
993 static const EventStreamProvider<AudioProcessingEvent> audioProcessEvent = con
st EventStreamProvider<AudioProcessingEvent>('audioprocess'); | 1036 static const EventStreamProvider<AudioProcessingEvent> audioProcessEvent = |
| 1037 const EventStreamProvider<AudioProcessingEvent>('audioprocess'); |
994 | 1038 |
995 @DomName('ScriptProcessorNode.bufferSize') | 1039 @DomName('ScriptProcessorNode.bufferSize') |
996 @DocsEditable() | 1040 @DocsEditable() |
997 final int bufferSize; | 1041 final int bufferSize; |
998 | 1042 |
999 @DomName('ScriptProcessorNode.setEventListener') | 1043 @DomName('ScriptProcessorNode.setEventListener') |
1000 @DocsEditable() | 1044 @DocsEditable() |
1001 @Experimental() // untriaged | 1045 @Experimental() // untriaged |
1002 void setEventListener(EventListener eventListener) native; | 1046 void setEventListener(EventListener eventListener) native ; |
1003 | 1047 |
1004 /// Stream of `audioprocess` events handled by this [ScriptProcessorNode]. | 1048 /// Stream of `audioprocess` events handled by this [ScriptProcessorNode]. |
1005 /** | 1049 /** |
1006 * Get a Stream that fires events when AudioProcessingEvents occur. | 1050 * Get a Stream that fires events when AudioProcessingEvents occur. |
1007 * This particular stream is special in that it only allows one listener to a | 1051 * This particular stream is special in that it only allows one listener to a |
1008 * given stream. Converting the returned Stream [asBroadcast] will likely ruin | 1052 * given stream. Converting the returned Stream [asBroadcast] will likely ruin |
1009 * the soft-real-time properties which which these events are fired and can | 1053 * the soft-real-time properties which which these events are fired and can |
1010 * be processed. | 1054 * be processed. |
1011 */ | 1055 */ |
1012 @DomName('ScriptProcessorNode.onaudioprocess') | 1056 @DomName('ScriptProcessorNode.onaudioprocess') |
1013 @DocsEditable() | 1057 @DocsEditable() |
1014 @Experimental() // untriaged | 1058 @Experimental() // untriaged |
1015 Stream<AudioProcessingEvent> get onAudioProcess => audioProcessEvent.forTarget
(this); | 1059 Stream<AudioProcessingEvent> get onAudioProcess => |
| 1060 audioProcessEvent.forTarget(this); |
1016 } | 1061 } |
1017 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1062 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
1018 // for details. All rights reserved. Use of this source code is governed by a | 1063 // for details. All rights reserved. Use of this source code is governed by a |
1019 // BSD-style license that can be found in the LICENSE file. | 1064 // BSD-style license that can be found in the LICENSE file. |
1020 | 1065 |
1021 | |
1022 @DocsEditable() | 1066 @DocsEditable() |
1023 @DomName('StereoPannerNode') | 1067 @DomName('StereoPannerNode') |
1024 @Experimental() // untriaged | 1068 @Experimental() // untriaged |
1025 @Native("StereoPannerNode") | 1069 @Native("StereoPannerNode") |
1026 class StereoPannerNode extends AudioNode { | 1070 class StereoPannerNode extends AudioNode { |
1027 // To suppress missing implicit constructor warnings. | 1071 // To suppress missing implicit constructor warnings. |
1028 factory StereoPannerNode._() { throw new UnsupportedError("Not supported"); } | 1072 factory StereoPannerNode._() { |
| 1073 throw new UnsupportedError("Not supported"); |
| 1074 } |
1029 | 1075 |
1030 @DomName('StereoPannerNode.pan') | 1076 @DomName('StereoPannerNode.pan') |
1031 @DocsEditable() | 1077 @DocsEditable() |
1032 @Experimental() // untriaged | 1078 @Experimental() // untriaged |
1033 final AudioParam pan; | 1079 final AudioParam pan; |
1034 } | 1080 } |
1035 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1081 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
1036 // for details. All rights reserved. Use of this source code is governed by a | 1082 // for details. All rights reserved. Use of this source code is governed by a |
1037 // BSD-style license that can be found in the LICENSE file. | 1083 // BSD-style license that can be found in the LICENSE file. |
1038 | 1084 |
1039 | |
1040 @DocsEditable() | 1085 @DocsEditable() |
1041 @DomName('WaveShaperNode') | 1086 @DomName('WaveShaperNode') |
1042 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Wav
eShaperNode | 1087 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Wav
eShaperNode |
1043 @Experimental() | 1088 @Experimental() |
1044 @Native("WaveShaperNode") | 1089 @Native("WaveShaperNode") |
1045 class WaveShaperNode extends AudioNode { | 1090 class WaveShaperNode extends AudioNode { |
1046 // To suppress missing implicit constructor warnings. | 1091 // To suppress missing implicit constructor warnings. |
1047 factory WaveShaperNode._() { throw new UnsupportedError("Not supported"); } | 1092 factory WaveShaperNode._() { |
| 1093 throw new UnsupportedError("Not supported"); |
| 1094 } |
1048 | 1095 |
1049 @DomName('WaveShaperNode.curve') | 1096 @DomName('WaveShaperNode.curve') |
1050 @DocsEditable() | 1097 @DocsEditable() |
1051 Float32List curve; | 1098 Float32List curve; |
1052 | 1099 |
1053 @DomName('WaveShaperNode.oversample') | 1100 @DomName('WaveShaperNode.oversample') |
1054 @DocsEditable() | 1101 @DocsEditable() |
1055 String oversample; | 1102 String oversample; |
1056 } | 1103 } |
OLD | NEW |