| OLD | NEW |
| 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:_collection-dev' hide deprecated; | 5 import 'dart:_collection-dev' 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 // DO NOT EDIT | 10 // DO NOT EDIT |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 | 141 |
| 142 @DocsEditable() | 142 @DocsEditable() |
| 143 @DomName('AudioBufferSourceNode') | 143 @DomName('AudioBufferSourceNode') |
| 144 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu
fferSourceNode-section | 144 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu
fferSourceNode-section |
| 145 @Experimental() | 145 @Experimental() |
| 146 class AudioBufferSourceNode extends AudioSourceNode { | 146 class AudioBufferSourceNode extends AudioSourceNode { |
| 147 // To suppress missing implicit constructor warnings. | 147 // To suppress missing implicit constructor warnings. |
| 148 factory AudioBufferSourceNode._() { throw new UnsupportedError("Not supported"
); } | 148 factory AudioBufferSourceNode._() { throw new UnsupportedError("Not supported"
); } |
| 149 | 149 |
| 150 /** |
| 151 * Static factory designed to expose `ended` events to event |
| 152 * handlers that are not necessarily instances of [AudioBufferSourceNode]. |
| 153 * |
| 154 * See [EventStreamProvider] for usage information. |
| 155 */ |
| 150 @DomName('AudioBufferSourceNode.endedEvent') | 156 @DomName('AudioBufferSourceNode.endedEvent') |
| 151 @DocsEditable() | 157 @DocsEditable() |
| 152 @Experimental() // untriaged | 158 @Experimental() // untriaged |
| 153 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider
<Event>('ended'); | 159 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider
<Event>('ended'); |
| 154 | 160 |
| 155 @DomName('AudioBufferSourceNode.FINISHED_STATE') | 161 @DomName('AudioBufferSourceNode.FINISHED_STATE') |
| 156 @DocsEditable() | 162 @DocsEditable() |
| 157 static const int FINISHED_STATE = 3; | 163 static const int FINISHED_STATE = 3; |
| 158 | 164 |
| 159 @DomName('AudioBufferSourceNode.PLAYING_STATE') | 165 @DomName('AudioBufferSourceNode.PLAYING_STATE') |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 void _start_1(when) native "AudioBufferSourceNode__start_1_Callback"; | 249 void _start_1(when) native "AudioBufferSourceNode__start_1_Callback"; |
| 244 | 250 |
| 245 void _start_2(when, grainOffset) native "AudioBufferSourceNode__start_2_Callba
ck"; | 251 void _start_2(when, grainOffset) native "AudioBufferSourceNode__start_2_Callba
ck"; |
| 246 | 252 |
| 247 void _start_3(when, grainOffset, grainDuration) native "AudioBufferSourceNode_
_start_3_Callback"; | 253 void _start_3(when, grainOffset, grainDuration) native "AudioBufferSourceNode_
_start_3_Callback"; |
| 248 | 254 |
| 249 @DomName('AudioBufferSourceNode.stop') | 255 @DomName('AudioBufferSourceNode.stop') |
| 250 @DocsEditable() | 256 @DocsEditable() |
| 251 void stop(num when) native "AudioBufferSourceNode_stop_Callback"; | 257 void stop(num when) native "AudioBufferSourceNode_stop_Callback"; |
| 252 | 258 |
| 259 /// Stream of `ended` events handled by this [AudioBufferSourceNode]. |
| 253 @DomName('AudioBufferSourceNode.onended') | 260 @DomName('AudioBufferSourceNode.onended') |
| 254 @DocsEditable() | 261 @DocsEditable() |
| 255 @Experimental() // untriaged | 262 @Experimental() // untriaged |
| 256 Stream<Event> get onEnded => endedEvent.forTarget(this); | 263 Stream<Event> get onEnded => endedEvent.forTarget(this); |
| 257 | 264 |
| 258 } | 265 } |
| 259 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 266 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 260 // for details. All rights reserved. Use of this source code is governed by a | 267 // for details. All rights reserved. Use of this source code is governed by a |
| 261 // BSD-style license that can be found in the LICENSE file. | 268 // BSD-style license that can be found in the LICENSE file. |
| 262 | 269 |
| 263 | 270 |
| 264 @DomName('AudioContext') | 271 @DomName('AudioContext') |
| 265 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioCo
ntext-section | 272 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioCo
ntext-section |
| 266 @Experimental() | 273 @Experimental() |
| 267 class AudioContext extends EventTarget { | 274 class AudioContext extends EventTarget { |
| 268 // To suppress missing implicit constructor warnings. | 275 // To suppress missing implicit constructor warnings. |
| 269 factory AudioContext._() { throw new UnsupportedError("Not supported"); } | 276 factory AudioContext._() { throw new UnsupportedError("Not supported"); } |
| 270 | 277 |
| 278 /** |
| 279 * Static factory designed to expose `complete` events to event |
| 280 * handlers that are not necessarily instances of [AudioContext]. |
| 281 * |
| 282 * See [EventStreamProvider] for usage information. |
| 283 */ |
| 271 @DomName('AudioContext.completeEvent') | 284 @DomName('AudioContext.completeEvent') |
| 272 @DocsEditable() | 285 @DocsEditable() |
| 273 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi
der<Event>('complete'); | 286 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi
der<Event>('complete'); |
| 274 | 287 |
| 275 @DomName('AudioContext.AudioContext') | 288 @DomName('AudioContext.AudioContext') |
| 276 @DocsEditable() | 289 @DocsEditable() |
| 277 factory AudioContext() => _create(); | 290 factory AudioContext() => _create(); |
| 278 | 291 |
| 279 @DocsEditable() | 292 @DocsEditable() |
| 280 static AudioContext _create() native "AudioContext_constructorCallback"; | 293 static AudioContext _create() native "AudioContext_constructorCallback"; |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 @DomName('AudioContext.dispatchEvent') | 480 @DomName('AudioContext.dispatchEvent') |
| 468 @DocsEditable() | 481 @DocsEditable() |
| 469 @Experimental() // untriaged | 482 @Experimental() // untriaged |
| 470 bool dispatchEvent(Event event) native "AudioContext_dispatchEvent_Callback"; | 483 bool dispatchEvent(Event event) native "AudioContext_dispatchEvent_Callback"; |
| 471 | 484 |
| 472 @DomName('AudioContext.removeEventListener') | 485 @DomName('AudioContext.removeEventListener') |
| 473 @DocsEditable() | 486 @DocsEditable() |
| 474 @Experimental() // untriaged | 487 @Experimental() // untriaged |
| 475 void removeEventListener(String type, EventListener listener, [bool useCapture
]) native "AudioContext_removeEventListener_Callback"; | 488 void removeEventListener(String type, EventListener listener, [bool useCapture
]) native "AudioContext_removeEventListener_Callback"; |
| 476 | 489 |
| 490 /// Stream of `complete` events handled by this [AudioContext]. |
| 477 @DomName('AudioContext.oncomplete') | 491 @DomName('AudioContext.oncomplete') |
| 478 @DocsEditable() | 492 @DocsEditable() |
| 479 Stream<Event> get onComplete => completeEvent.forTarget(this); | 493 Stream<Event> get onComplete => completeEvent.forTarget(this); |
| 480 | 494 |
| 481 } | 495 } |
| 482 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 496 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 483 // for details. All rights reserved. Use of this source code is governed by a | 497 // for details. All rights reserved. Use of this source code is governed by a |
| 484 // BSD-style license that can be found in the LICENSE file. | 498 // BSD-style license that can be found in the LICENSE file. |
| 485 | 499 |
| 486 // WARNING: Do not edit - generated code. | 500 // WARNING: Do not edit - generated code. |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1077 | 1091 |
| 1078 | 1092 |
| 1079 @DocsEditable() | 1093 @DocsEditable() |
| 1080 @DomName('OscillatorNode') | 1094 @DomName('OscillatorNode') |
| 1081 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Osc
illatorNode | 1095 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Osc
illatorNode |
| 1082 @Experimental() | 1096 @Experimental() |
| 1083 class OscillatorNode extends AudioSourceNode { | 1097 class OscillatorNode extends AudioSourceNode { |
| 1084 // To suppress missing implicit constructor warnings. | 1098 // To suppress missing implicit constructor warnings. |
| 1085 factory OscillatorNode._() { throw new UnsupportedError("Not supported"); } | 1099 factory OscillatorNode._() { throw new UnsupportedError("Not supported"); } |
| 1086 | 1100 |
| 1101 /** |
| 1102 * Static factory designed to expose `ended` events to event |
| 1103 * handlers that are not necessarily instances of [OscillatorNode]. |
| 1104 * |
| 1105 * See [EventStreamProvider] for usage information. |
| 1106 */ |
| 1087 @DomName('OscillatorNode.endedEvent') | 1107 @DomName('OscillatorNode.endedEvent') |
| 1088 @DocsEditable() | 1108 @DocsEditable() |
| 1089 @Experimental() // untriaged | 1109 @Experimental() // untriaged |
| 1090 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider
<Event>('ended'); | 1110 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider
<Event>('ended'); |
| 1091 | 1111 |
| 1092 @DomName('OscillatorNode.FINISHED_STATE') | 1112 @DomName('OscillatorNode.FINISHED_STATE') |
| 1093 @DocsEditable() | 1113 @DocsEditable() |
| 1094 static const int FINISHED_STATE = 3; | 1114 static const int FINISHED_STATE = 3; |
| 1095 | 1115 |
| 1096 @DomName('OscillatorNode.PLAYING_STATE') | 1116 @DomName('OscillatorNode.PLAYING_STATE') |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 void setPeriodicWave(PeriodicWave periodicWave) native "OscillatorNode_setPeri
odicWave_Callback"; | 1159 void setPeriodicWave(PeriodicWave periodicWave) native "OscillatorNode_setPeri
odicWave_Callback"; |
| 1140 | 1160 |
| 1141 @DomName('OscillatorNode.start') | 1161 @DomName('OscillatorNode.start') |
| 1142 @DocsEditable() | 1162 @DocsEditable() |
| 1143 void start(num when) native "OscillatorNode_start_Callback"; | 1163 void start(num when) native "OscillatorNode_start_Callback"; |
| 1144 | 1164 |
| 1145 @DomName('OscillatorNode.stop') | 1165 @DomName('OscillatorNode.stop') |
| 1146 @DocsEditable() | 1166 @DocsEditable() |
| 1147 void stop(num when) native "OscillatorNode_stop_Callback"; | 1167 void stop(num when) native "OscillatorNode_stop_Callback"; |
| 1148 | 1168 |
| 1169 /// Stream of `ended` events handled by this [OscillatorNode]. |
| 1149 @DomName('OscillatorNode.onended') | 1170 @DomName('OscillatorNode.onended') |
| 1150 @DocsEditable() | 1171 @DocsEditable() |
| 1151 @Experimental() // untriaged | 1172 @Experimental() // untriaged |
| 1152 Stream<Event> get onEnded => endedEvent.forTarget(this); | 1173 Stream<Event> get onEnded => endedEvent.forTarget(this); |
| 1153 | 1174 |
| 1154 } | 1175 } |
| 1155 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1176 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1156 // for details. All rights reserved. Use of this source code is governed by a | 1177 // for details. All rights reserved. Use of this source code is governed by a |
| 1157 // BSD-style license that can be found in the LICENSE file. | 1178 // BSD-style license that can be found in the LICENSE file. |
| 1158 | 1179 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1267 | 1288 |
| 1268 | 1289 |
| 1269 @DocsEditable() | 1290 @DocsEditable() |
| 1270 @DomName('ScriptProcessorNode') | 1291 @DomName('ScriptProcessorNode') |
| 1271 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ScriptP
rocessorNode | 1292 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ScriptP
rocessorNode |
| 1272 @Experimental() | 1293 @Experimental() |
| 1273 class ScriptProcessorNode extends AudioNode { | 1294 class ScriptProcessorNode extends AudioNode { |
| 1274 // To suppress missing implicit constructor warnings. | 1295 // To suppress missing implicit constructor warnings. |
| 1275 factory ScriptProcessorNode._() { throw new UnsupportedError("Not supported");
} | 1296 factory ScriptProcessorNode._() { throw new UnsupportedError("Not supported");
} |
| 1276 | 1297 |
| 1298 /** |
| 1299 * Static factory designed to expose `audioprocess` events to event |
| 1300 * handlers that are not necessarily instances of [ScriptProcessorNode]. |
| 1301 * |
| 1302 * See [EventStreamProvider] for usage information. |
| 1303 */ |
| 1277 @DomName('ScriptProcessorNode.audioprocessEvent') | 1304 @DomName('ScriptProcessorNode.audioprocessEvent') |
| 1278 @DocsEditable() | 1305 @DocsEditable() |
| 1279 @Experimental() // untriaged | 1306 @Experimental() // untriaged |
| 1280 static const EventStreamProvider<AudioProcessingEvent> audioProcessEvent = con
st EventStreamProvider<AudioProcessingEvent>('audioprocess'); | 1307 static const EventStreamProvider<AudioProcessingEvent> audioProcessEvent = con
st EventStreamProvider<AudioProcessingEvent>('audioprocess'); |
| 1281 | 1308 |
| 1282 @DomName('ScriptProcessorNode.bufferSize') | 1309 @DomName('ScriptProcessorNode.bufferSize') |
| 1283 @DocsEditable() | 1310 @DocsEditable() |
| 1284 int get bufferSize native "ScriptProcessorNode_bufferSize_Getter"; | 1311 int get bufferSize native "ScriptProcessorNode_bufferSize_Getter"; |
| 1285 | 1312 |
| 1286 @DomName('ScriptProcessorNode._setEventListener') | 1313 @DomName('ScriptProcessorNode._setEventListener') |
| 1287 @DocsEditable() | 1314 @DocsEditable() |
| 1288 @Experimental() // non-standard | 1315 @Experimental() // non-standard |
| 1289 void _setEventListener(EventListener eventListener) native "ScriptProcessorNod
e__setEventListener_Callback"; | 1316 void _setEventListener(EventListener eventListener) native "ScriptProcessorNod
e__setEventListener_Callback"; |
| 1290 | 1317 |
| 1291 /** | 1318 /// Stream of `audioprocess` events handled by this [ScriptProcessorNode]. |
| 1319 /** |
| 1292 * Get a Stream that fires events when AudioProcessingEvents occur. | 1320 * Get a Stream that fires events when AudioProcessingEvents occur. |
| 1293 * This particular stream is special in that it only allows one listener to a | 1321 * This particular stream is special in that it only allows one listener to a |
| 1294 * given stream. Converting the returned Stream [asBroadcast] will likely ruin | 1322 * given stream. Converting the returned Stream [asBroadcast] will likely ruin |
| 1295 * the soft-real-time properties which which these events are fired and can | 1323 * the soft-real-time properties which which these events are fired and can |
| 1296 * be processed. | 1324 * be processed. |
| 1297 */ | 1325 */ |
| 1298 @DomName('ScriptProcessorNode.onaudioprocess') | 1326 @DomName('ScriptProcessorNode.onaudioprocess') |
| 1299 @DocsEditable() | 1327 @DocsEditable() |
| 1300 @Experimental() // untriaged | 1328 @Experimental() // untriaged |
| 1301 Stream<AudioProcessingEvent> get onAudioProcess => audioProcessEvent.forTarget
(this); | 1329 Stream<AudioProcessingEvent> get onAudioProcess => audioProcessEvent.forTarget
(this); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1326 | 1354 |
| 1327 @DomName('WaveShaperNode.oversample') | 1355 @DomName('WaveShaperNode.oversample') |
| 1328 @DocsEditable() | 1356 @DocsEditable() |
| 1329 String get oversample native "WaveShaperNode_oversample_Getter"; | 1357 String get oversample native "WaveShaperNode_oversample_Getter"; |
| 1330 | 1358 |
| 1331 @DomName('WaveShaperNode.oversample') | 1359 @DomName('WaveShaperNode.oversample') |
| 1332 @DocsEditable() | 1360 @DocsEditable() |
| 1333 void set oversample(String value) native "WaveShaperNode_oversample_Setter"; | 1361 void set oversample(String value) native "WaveShaperNode_oversample_Setter"; |
| 1334 | 1362 |
| 1335 } | 1363 } |
| OLD | NEW |