OLD | NEW |
(Empty) | |
| 1 library web_audio; |
| 2 |
| 3 import 'dart:html'; |
| 4 import 'dart:nativewrappers'; |
| 5 // DO NOT EDIT |
| 6 // Auto-generated dart:audio library. |
| 7 |
| 8 |
| 9 |
| 10 |
| 11 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 12 // for details. All rights reserved. Use of this source code is governed by a |
| 13 // BSD-style license that can be found in the LICENSE file. |
| 14 |
| 15 // WARNING: Do not edit - generated code. |
| 16 |
| 17 |
| 18 /// @domName AnalyserNode |
| 19 class AnalyserNode extends AudioNode { |
| 20 AnalyserNode.internal(): super.internal(); |
| 21 |
| 22 |
| 23 /** @domName AnalyserNode.fftSize */ |
| 24 int get fftSize native "AnalyserNode_fftSize_Getter"; |
| 25 |
| 26 |
| 27 /** @domName AnalyserNode.fftSize */ |
| 28 void set fftSize(int value) native "AnalyserNode_fftSize_Setter"; |
| 29 |
| 30 |
| 31 /** @domName AnalyserNode.frequencyBinCount */ |
| 32 int get frequencyBinCount native "AnalyserNode_frequencyBinCount_Getter"; |
| 33 |
| 34 |
| 35 /** @domName AnalyserNode.maxDecibels */ |
| 36 num get maxDecibels native "AnalyserNode_maxDecibels_Getter"; |
| 37 |
| 38 |
| 39 /** @domName AnalyserNode.maxDecibels */ |
| 40 void set maxDecibels(num value) native "AnalyserNode_maxDecibels_Setter"; |
| 41 |
| 42 |
| 43 /** @domName AnalyserNode.minDecibels */ |
| 44 num get minDecibels native "AnalyserNode_minDecibels_Getter"; |
| 45 |
| 46 |
| 47 /** @domName AnalyserNode.minDecibels */ |
| 48 void set minDecibels(num value) native "AnalyserNode_minDecibels_Setter"; |
| 49 |
| 50 |
| 51 /** @domName AnalyserNode.smoothingTimeConstant */ |
| 52 num get smoothingTimeConstant native "AnalyserNode_smoothingTimeConstant_Gette
r"; |
| 53 |
| 54 |
| 55 /** @domName AnalyserNode.smoothingTimeConstant */ |
| 56 void set smoothingTimeConstant(num value) native "AnalyserNode_smoothingTimeCo
nstant_Setter"; |
| 57 |
| 58 |
| 59 /** @domName AnalyserNode.getByteFrequencyData */ |
| 60 void getByteFrequencyData(Uint8Array array) native "AnalyserNode_getByteFreque
ncyData_Callback"; |
| 61 |
| 62 |
| 63 /** @domName AnalyserNode.getByteTimeDomainData */ |
| 64 void getByteTimeDomainData(Uint8Array array) native "AnalyserNode_getByteTimeD
omainData_Callback"; |
| 65 |
| 66 |
| 67 /** @domName AnalyserNode.getFloatFrequencyData */ |
| 68 void getFloatFrequencyData(Float32Array array) native "AnalyserNode_getFloatFr
equencyData_Callback"; |
| 69 |
| 70 } |
| 71 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 72 // for details. All rights reserved. Use of this source code is governed by a |
| 73 // BSD-style license that can be found in the LICENSE file. |
| 74 |
| 75 // WARNING: Do not edit - generated code. |
| 76 |
| 77 |
| 78 /// @domName AudioBuffer |
| 79 class AudioBuffer extends NativeFieldWrapperClass1 { |
| 80 AudioBuffer.internal(); |
| 81 |
| 82 |
| 83 /** @domName AudioBuffer.duration */ |
| 84 num get duration native "AudioBuffer_duration_Getter"; |
| 85 |
| 86 |
| 87 /** @domName AudioBuffer.gain */ |
| 88 num get gain native "AudioBuffer_gain_Getter"; |
| 89 |
| 90 |
| 91 /** @domName AudioBuffer.gain */ |
| 92 void set gain(num value) native "AudioBuffer_gain_Setter"; |
| 93 |
| 94 |
| 95 /** @domName AudioBuffer.length */ |
| 96 int get length native "AudioBuffer_length_Getter"; |
| 97 |
| 98 |
| 99 /** @domName AudioBuffer.numberOfChannels */ |
| 100 int get numberOfChannels native "AudioBuffer_numberOfChannels_Getter"; |
| 101 |
| 102 |
| 103 /** @domName AudioBuffer.sampleRate */ |
| 104 num get sampleRate native "AudioBuffer_sampleRate_Getter"; |
| 105 |
| 106 |
| 107 /** @domName AudioBuffer.getChannelData */ |
| 108 Float32Array getChannelData(int channelIndex) native "AudioBuffer_getChannelDa
ta_Callback"; |
| 109 |
| 110 } |
| 111 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 112 // for details. All rights reserved. Use of this source code is governed by a |
| 113 // BSD-style license that can be found in the LICENSE file. |
| 114 |
| 115 // WARNING: Do not edit - generated code. |
| 116 |
| 117 |
| 118 typedef void AudioBufferCallback(AudioBuffer audioBuffer); |
| 119 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 120 // for details. All rights reserved. Use of this source code is governed by a |
| 121 // BSD-style license that can be found in the LICENSE file. |
| 122 |
| 123 // WARNING: Do not edit - generated code. |
| 124 |
| 125 |
| 126 /// @domName AudioBufferSourceNode |
| 127 class AudioBufferSourceNode extends AudioSourceNode { |
| 128 AudioBufferSourceNode.internal(): super.internal(); |
| 129 |
| 130 static const int FINISHED_STATE = 3; |
| 131 |
| 132 static const int PLAYING_STATE = 2; |
| 133 |
| 134 static const int SCHEDULED_STATE = 1; |
| 135 |
| 136 static const int UNSCHEDULED_STATE = 0; |
| 137 |
| 138 |
| 139 /** @domName AudioBufferSourceNode.buffer */ |
| 140 AudioBuffer get buffer native "AudioBufferSourceNode_buffer_Getter"; |
| 141 |
| 142 |
| 143 /** @domName AudioBufferSourceNode.buffer */ |
| 144 void set buffer(AudioBuffer value) native "AudioBufferSourceNode_buffer_Setter
"; |
| 145 |
| 146 |
| 147 /** @domName AudioBufferSourceNode.gain */ |
| 148 AudioGain get gain native "AudioBufferSourceNode_gain_Getter"; |
| 149 |
| 150 |
| 151 /** @domName AudioBufferSourceNode.loop */ |
| 152 bool get loop native "AudioBufferSourceNode_loop_Getter"; |
| 153 |
| 154 |
| 155 /** @domName AudioBufferSourceNode.loop */ |
| 156 void set loop(bool value) native "AudioBufferSourceNode_loop_Setter"; |
| 157 |
| 158 |
| 159 /** @domName AudioBufferSourceNode.loopEnd */ |
| 160 num get loopEnd native "AudioBufferSourceNode_loopEnd_Getter"; |
| 161 |
| 162 |
| 163 /** @domName AudioBufferSourceNode.loopEnd */ |
| 164 void set loopEnd(num value) native "AudioBufferSourceNode_loopEnd_Setter"; |
| 165 |
| 166 |
| 167 /** @domName AudioBufferSourceNode.loopStart */ |
| 168 num get loopStart native "AudioBufferSourceNode_loopStart_Getter"; |
| 169 |
| 170 |
| 171 /** @domName AudioBufferSourceNode.loopStart */ |
| 172 void set loopStart(num value) native "AudioBufferSourceNode_loopStart_Setter"; |
| 173 |
| 174 |
| 175 /** @domName AudioBufferSourceNode.playbackRate */ |
| 176 AudioParam get playbackRate native "AudioBufferSourceNode_playbackRate_Getter"
; |
| 177 |
| 178 |
| 179 /** @domName AudioBufferSourceNode.playbackState */ |
| 180 int get playbackState native "AudioBufferSourceNode_playbackState_Getter"; |
| 181 |
| 182 void start(/*double*/ when, [/*double*/ grainOffset, /*double*/ grainDuration]
) { |
| 183 if ((when is num || when == null) && !?grainOffset && !?grainDuration) { |
| 184 _start_1(when); |
| 185 return; |
| 186 } |
| 187 if ((when is num || when == null) && (grainOffset is num || grainOffset == n
ull) && (grainDuration is num || grainDuration == null)) { |
| 188 _start_2(when, grainOffset, grainDuration); |
| 189 return; |
| 190 } |
| 191 throw "Incorrect number or type of arguments"; |
| 192 } |
| 193 |
| 194 |
| 195 /** @domName AudioBufferSourceNode.start_1 */ |
| 196 void _start_1(when) native "AudioBufferSourceNode_start_1_Callback"; |
| 197 |
| 198 |
| 199 /** @domName AudioBufferSourceNode.start_2 */ |
| 200 void _start_2(when, grainOffset, grainDuration) native "AudioBufferSourceNode_
start_2_Callback"; |
| 201 |
| 202 |
| 203 /** @domName AudioBufferSourceNode.stop */ |
| 204 void stop(num when) native "AudioBufferSourceNode_stop_Callback"; |
| 205 |
| 206 } |
| 207 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 208 // for details. All rights reserved. Use of this source code is governed by a |
| 209 // BSD-style license that can be found in the LICENSE file. |
| 210 |
| 211 |
| 212 class AudioContext extends EventTarget { |
| 213 factory AudioContext() => _createAudioContext(); |
| 214 |
| 215 static _createAudioContext([int numberOfChannels, |
| 216 int numberOfFrames, |
| 217 int sampleRate]) |
| 218 native "AudioContext_constructor_Callback"; |
| 219 |
| 220 AudioContext.internal(): super.internal(); |
| 221 |
| 222 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true |
| 223 AudioContextEvents get on => |
| 224 new AudioContextEvents(this); |
| 225 |
| 226 |
| 227 /** @domName AudioContext.activeSourceCount */ |
| 228 int get activeSourceCount native "AudioContext_activeSourceCount_Getter"; |
| 229 |
| 230 |
| 231 /** @domName AudioContext.currentTime */ |
| 232 num get currentTime native "AudioContext_currentTime_Getter"; |
| 233 |
| 234 |
| 235 /** @domName AudioContext.destination */ |
| 236 AudioDestinationNode get destination native "AudioContext_destination_Getter"; |
| 237 |
| 238 |
| 239 /** @domName AudioContext.listener */ |
| 240 AudioListener get listener native "AudioContext_listener_Getter"; |
| 241 |
| 242 |
| 243 /** @domName AudioContext.sampleRate */ |
| 244 num get sampleRate native "AudioContext_sampleRate_Getter"; |
| 245 |
| 246 |
| 247 /** @domName AudioContext.createAnalyser */ |
| 248 AnalyserNode createAnalyser() native "AudioContext_createAnalyser_Callback"; |
| 249 |
| 250 |
| 251 /** @domName AudioContext.createBiquadFilter */ |
| 252 BiquadFilterNode createBiquadFilter() native "AudioContext_createBiquadFilter_
Callback"; |
| 253 |
| 254 AudioBuffer createBuffer(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFram
es, [/*float*/ sampleRate]) { |
| 255 if ((buffer_OR_numberOfChannels is int || buffer_OR_numberOfChannels == null
) && (mixToMono_OR_numberOfFrames is int || mixToMono_OR_numberOfFrames == null)
&& (sampleRate is num || sampleRate == null)) { |
| 256 return _createBuffer_1(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFr
ames, sampleRate); |
| 257 } |
| 258 if ((buffer_OR_numberOfChannels is ArrayBuffer || buffer_OR_numberOfChannels
== null) && (mixToMono_OR_numberOfFrames is bool || mixToMono_OR_numberOfFrames
== null) && !?sampleRate) { |
| 259 return _createBuffer_2(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFr
ames); |
| 260 } |
| 261 throw "Incorrect number or type of arguments"; |
| 262 } |
| 263 |
| 264 |
| 265 /** @domName AudioContext.createBuffer_1 */ |
| 266 AudioBuffer _createBuffer_1(buffer_OR_numberOfChannels, mixToMono_OR_numberOfF
rames, sampleRate) native "AudioContext_createBuffer_1_Callback"; |
| 267 |
| 268 |
| 269 /** @domName AudioContext.createBuffer_2 */ |
| 270 AudioBuffer _createBuffer_2(buffer_OR_numberOfChannels, mixToMono_OR_numberOfF
rames) native "AudioContext_createBuffer_2_Callback"; |
| 271 |
| 272 |
| 273 /** @domName AudioContext.createBufferSource */ |
| 274 AudioBufferSourceNode createBufferSource() native "AudioContext_createBufferSo
urce_Callback"; |
| 275 |
| 276 ChannelMergerNode createChannelMerger([/*unsigned long*/ numberOfInputs]) { |
| 277 if (?numberOfInputs) { |
| 278 return _createChannelMerger_1(numberOfInputs); |
| 279 } |
| 280 return _createChannelMerger_2(); |
| 281 } |
| 282 |
| 283 |
| 284 /** @domName AudioContext.createChannelMerger_1 */ |
| 285 ChannelMergerNode _createChannelMerger_1(numberOfInputs) native "AudioContext_
createChannelMerger_1_Callback"; |
| 286 |
| 287 |
| 288 /** @domName AudioContext.createChannelMerger_2 */ |
| 289 ChannelMergerNode _createChannelMerger_2() native "AudioContext_createChannelM
erger_2_Callback"; |
| 290 |
| 291 ChannelSplitterNode createChannelSplitter([/*unsigned long*/ numberOfOutputs])
{ |
| 292 if (?numberOfOutputs) { |
| 293 return _createChannelSplitter_1(numberOfOutputs); |
| 294 } |
| 295 return _createChannelSplitter_2(); |
| 296 } |
| 297 |
| 298 |
| 299 /** @domName AudioContext.createChannelSplitter_1 */ |
| 300 ChannelSplitterNode _createChannelSplitter_1(numberOfOutputs) native "AudioCon
text_createChannelSplitter_1_Callback"; |
| 301 |
| 302 |
| 303 /** @domName AudioContext.createChannelSplitter_2 */ |
| 304 ChannelSplitterNode _createChannelSplitter_2() native "AudioContext_createChan
nelSplitter_2_Callback"; |
| 305 |
| 306 |
| 307 /** @domName AudioContext.createConvolver */ |
| 308 ConvolverNode createConvolver() native "AudioContext_createConvolver_Callback"
; |
| 309 |
| 310 DelayNode createDelay([/*double*/ maxDelayTime]) { |
| 311 if (?maxDelayTime) { |
| 312 return _createDelay_1(maxDelayTime); |
| 313 } |
| 314 return _createDelay_2(); |
| 315 } |
| 316 |
| 317 |
| 318 /** @domName AudioContext.createDelay_1 */ |
| 319 DelayNode _createDelay_1(maxDelayTime) native "AudioContext_createDelay_1_Call
back"; |
| 320 |
| 321 |
| 322 /** @domName AudioContext.createDelay_2 */ |
| 323 DelayNode _createDelay_2() native "AudioContext_createDelay_2_Callback"; |
| 324 |
| 325 |
| 326 /** @domName AudioContext.createDynamicsCompressor */ |
| 327 DynamicsCompressorNode createDynamicsCompressor() native "AudioContext_createD
ynamicsCompressor_Callback"; |
| 328 |
| 329 |
| 330 /** @domName AudioContext.createGain */ |
| 331 GainNode createGain() native "AudioContext_createGain_Callback"; |
| 332 |
| 333 |
| 334 /** @domName AudioContext.createMediaElementSource */ |
| 335 MediaElementAudioSourceNode createMediaElementSource(MediaElement mediaElement
) native "AudioContext_createMediaElementSource_Callback"; |
| 336 |
| 337 |
| 338 /** @domName AudioContext.createMediaStreamSource */ |
| 339 MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream) na
tive "AudioContext_createMediaStreamSource_Callback"; |
| 340 |
| 341 |
| 342 /** @domName AudioContext.createOscillator */ |
| 343 OscillatorNode createOscillator() native "AudioContext_createOscillator_Callba
ck"; |
| 344 |
| 345 |
| 346 /** @domName AudioContext.createPanner */ |
| 347 PannerNode createPanner() native "AudioContext_createPanner_Callback"; |
| 348 |
| 349 ScriptProcessorNode createScriptProcessor(/*unsigned long*/ bufferSize, [/*uns
igned long*/ numberOfInputChannels, /*unsigned long*/ numberOfOutputChannels]) { |
| 350 if (?numberOfOutputChannels) { |
| 351 return _createScriptProcessor_1(bufferSize, numberOfInputChannels, numberO
fOutputChannels); |
| 352 } |
| 353 if (?numberOfInputChannels) { |
| 354 return _createScriptProcessor_2(bufferSize, numberOfInputChannels); |
| 355 } |
| 356 return _createScriptProcessor_3(bufferSize); |
| 357 } |
| 358 |
| 359 |
| 360 /** @domName AudioContext.createScriptProcessor_1 */ |
| 361 ScriptProcessorNode _createScriptProcessor_1(bufferSize, numberOfInputChannels
, numberOfOutputChannels) native "AudioContext_createScriptProcessor_1_Callback"
; |
| 362 |
| 363 |
| 364 /** @domName AudioContext.createScriptProcessor_2 */ |
| 365 ScriptProcessorNode _createScriptProcessor_2(bufferSize, numberOfInputChannels
) native "AudioContext_createScriptProcessor_2_Callback"; |
| 366 |
| 367 |
| 368 /** @domName AudioContext.createScriptProcessor_3 */ |
| 369 ScriptProcessorNode _createScriptProcessor_3(bufferSize) native "AudioContext_
createScriptProcessor_3_Callback"; |
| 370 |
| 371 |
| 372 /** @domName AudioContext.createWaveShaper */ |
| 373 WaveShaperNode createWaveShaper() native "AudioContext_createWaveShaper_Callba
ck"; |
| 374 |
| 375 |
| 376 /** @domName AudioContext.createWaveTable */ |
| 377 WaveTable createWaveTable(Float32Array real, Float32Array imag) native "AudioC
ontext_createWaveTable_Callback"; |
| 378 |
| 379 |
| 380 /** @domName AudioContext.decodeAudioData */ |
| 381 void decodeAudioData(ArrayBuffer audioData, AudioBufferCallback successCallbac
k, [AudioBufferCallback errorCallback]) native "AudioContext_decodeAudioData_Cal
lback"; |
| 382 |
| 383 |
| 384 /** @domName AudioContext.startRendering */ |
| 385 void startRendering() native "AudioContext_startRendering_Callback"; |
| 386 |
| 387 } |
| 388 |
| 389 class AudioContextEvents extends Events { |
| 390 AudioContextEvents(EventTarget _ptr) : super(_ptr); |
| 391 |
| 392 EventListenerList get complete => this['complete']; |
| 393 } |
| 394 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 395 // for details. All rights reserved. Use of this source code is governed by a |
| 396 // BSD-style license that can be found in the LICENSE file. |
| 397 |
| 398 // WARNING: Do not edit - generated code. |
| 399 |
| 400 |
| 401 /// @domName AudioDestinationNode |
| 402 class AudioDestinationNode extends AudioNode { |
| 403 AudioDestinationNode.internal(): super.internal(); |
| 404 |
| 405 |
| 406 /** @domName AudioDestinationNode.numberOfChannels */ |
| 407 int get numberOfChannels native "AudioDestinationNode_numberOfChannels_Getter"
; |
| 408 |
| 409 } |
| 410 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 411 // for details. All rights reserved. Use of this source code is governed by a |
| 412 // BSD-style license that can be found in the LICENSE file. |
| 413 |
| 414 // WARNING: Do not edit - generated code. |
| 415 |
| 416 |
| 417 /// @domName HTMLAudioElement |
| 418 class AudioElement extends MediaElement { |
| 419 |
| 420 factory AudioElement([String src]) { |
| 421 if (!?src) { |
| 422 return _AudioElementFactoryProvider.createAudioElement(); |
| 423 } |
| 424 return _AudioElementFactoryProvider.createAudioElement(src); |
| 425 } |
| 426 AudioElement.internal(): super.internal(); |
| 427 |
| 428 } |
| 429 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 430 // for details. All rights reserved. Use of this source code is governed by a |
| 431 // BSD-style license that can be found in the LICENSE file. |
| 432 |
| 433 // WARNING: Do not edit - generated code. |
| 434 |
| 435 |
| 436 /// @domName AudioGain |
| 437 class AudioGain extends AudioParam { |
| 438 AudioGain.internal(): super.internal(); |
| 439 |
| 440 } |
| 441 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 442 // for details. All rights reserved. Use of this source code is governed by a |
| 443 // BSD-style license that can be found in the LICENSE file. |
| 444 |
| 445 // WARNING: Do not edit - generated code. |
| 446 |
| 447 |
| 448 /// @domName AudioListener |
| 449 class AudioListener extends NativeFieldWrapperClass1 { |
| 450 AudioListener.internal(); |
| 451 |
| 452 |
| 453 /** @domName AudioListener.dopplerFactor */ |
| 454 num get dopplerFactor native "AudioListener_dopplerFactor_Getter"; |
| 455 |
| 456 |
| 457 /** @domName AudioListener.dopplerFactor */ |
| 458 void set dopplerFactor(num value) native "AudioListener_dopplerFactor_Setter"; |
| 459 |
| 460 |
| 461 /** @domName AudioListener.speedOfSound */ |
| 462 num get speedOfSound native "AudioListener_speedOfSound_Getter"; |
| 463 |
| 464 |
| 465 /** @domName AudioListener.speedOfSound */ |
| 466 void set speedOfSound(num value) native "AudioListener_speedOfSound_Setter"; |
| 467 |
| 468 |
| 469 /** @domName AudioListener.setOrientation */ |
| 470 void setOrientation(num x, num y, num z, num xUp, num yUp, num zUp) native "Au
dioListener_setOrientation_Callback"; |
| 471 |
| 472 |
| 473 /** @domName AudioListener.setPosition */ |
| 474 void setPosition(num x, num y, num z) native "AudioListener_setPosition_Callba
ck"; |
| 475 |
| 476 |
| 477 /** @domName AudioListener.setVelocity */ |
| 478 void setVelocity(num x, num y, num z) native "AudioListener_setVelocity_Callba
ck"; |
| 479 |
| 480 } |
| 481 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 482 // for details. All rights reserved. Use of this source code is governed by a |
| 483 // BSD-style license that can be found in the LICENSE file. |
| 484 |
| 485 // WARNING: Do not edit - generated code. |
| 486 |
| 487 |
| 488 /// @domName AudioNode |
| 489 class AudioNode extends NativeFieldWrapperClass1 { |
| 490 AudioNode.internal(); |
| 491 |
| 492 |
| 493 /** @domName AudioNode.context */ |
| 494 AudioContext get context native "AudioNode_context_Getter"; |
| 495 |
| 496 |
| 497 /** @domName AudioNode.numberOfInputs */ |
| 498 int get numberOfInputs native "AudioNode_numberOfInputs_Getter"; |
| 499 |
| 500 |
| 501 /** @domName AudioNode.numberOfOutputs */ |
| 502 int get numberOfOutputs native "AudioNode_numberOfOutputs_Getter"; |
| 503 |
| 504 void connect(destination, /*unsigned long*/ output, [/*unsigned long*/ input])
{ |
| 505 if ((destination is AudioNode || destination == null) && (output is int || o
utput == null) && (input is int || input == null)) { |
| 506 _connect_1(destination, output, input); |
| 507 return; |
| 508 } |
| 509 if ((destination is AudioParam || destination == null) && (output is int ||
output == null) && !?input) { |
| 510 _connect_2(destination, output); |
| 511 return; |
| 512 } |
| 513 throw "Incorrect number or type of arguments"; |
| 514 } |
| 515 |
| 516 |
| 517 /** @domName AudioNode.connect_1 */ |
| 518 void _connect_1(destination, output, input) native "AudioNode_connect_1_Callba
ck"; |
| 519 |
| 520 |
| 521 /** @domName AudioNode.connect_2 */ |
| 522 void _connect_2(destination, output) native "AudioNode_connect_2_Callback"; |
| 523 |
| 524 |
| 525 /** @domName AudioNode.disconnect */ |
| 526 void disconnect(int output) native "AudioNode_disconnect_Callback"; |
| 527 |
| 528 } |
| 529 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 530 // for details. All rights reserved. Use of this source code is governed by a |
| 531 // BSD-style license that can be found in the LICENSE file. |
| 532 |
| 533 // WARNING: Do not edit - generated code. |
| 534 |
| 535 |
| 536 /// @domName AudioParam |
| 537 class AudioParam extends NativeFieldWrapperClass1 { |
| 538 AudioParam.internal(); |
| 539 |
| 540 |
| 541 /** @domName AudioParam.defaultValue */ |
| 542 num get defaultValue native "AudioParam_defaultValue_Getter"; |
| 543 |
| 544 |
| 545 /** @domName AudioParam.maxValue */ |
| 546 num get maxValue native "AudioParam_maxValue_Getter"; |
| 547 |
| 548 |
| 549 /** @domName AudioParam.minValue */ |
| 550 num get minValue native "AudioParam_minValue_Getter"; |
| 551 |
| 552 |
| 553 /** @domName AudioParam.name */ |
| 554 String get name native "AudioParam_name_Getter"; |
| 555 |
| 556 |
| 557 /** @domName AudioParam.units */ |
| 558 int get units native "AudioParam_units_Getter"; |
| 559 |
| 560 |
| 561 /** @domName AudioParam.value */ |
| 562 num get value native "AudioParam_value_Getter"; |
| 563 |
| 564 |
| 565 /** @domName AudioParam.value */ |
| 566 void set value(num value) native "AudioParam_value_Setter"; |
| 567 |
| 568 |
| 569 /** @domName AudioParam.cancelScheduledValues */ |
| 570 void cancelScheduledValues(num startTime) native "AudioParam_cancelScheduledVa
lues_Callback"; |
| 571 |
| 572 |
| 573 /** @domName AudioParam.exponentialRampToValueAtTime */ |
| 574 void exponentialRampToValueAtTime(num value, num time) native "AudioParam_expo
nentialRampToValueAtTime_Callback"; |
| 575 |
| 576 |
| 577 /** @domName AudioParam.linearRampToValueAtTime */ |
| 578 void linearRampToValueAtTime(num value, num time) native "AudioParam_linearRam
pToValueAtTime_Callback"; |
| 579 |
| 580 |
| 581 /** @domName AudioParam.setTargetAtTime */ |
| 582 void setTargetAtTime(num target, num time, num timeConstant) native "AudioPara
m_setTargetAtTime_Callback"; |
| 583 |
| 584 |
| 585 /** @domName AudioParam.setValueAtTime */ |
| 586 void setValueAtTime(num value, num time) native "AudioParam_setValueAtTime_Cal
lback"; |
| 587 |
| 588 |
| 589 /** @domName AudioParam.setValueCurveAtTime */ |
| 590 void setValueCurveAtTime(Float32Array values, num time, num duration) native "
AudioParam_setValueCurveAtTime_Callback"; |
| 591 |
| 592 } |
| 593 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 594 // for details. All rights reserved. Use of this source code is governed by a |
| 595 // BSD-style license that can be found in the LICENSE file. |
| 596 |
| 597 // WARNING: Do not edit - generated code. |
| 598 |
| 599 |
| 600 /// @domName AudioProcessingEvent |
| 601 class AudioProcessingEvent extends Event { |
| 602 AudioProcessingEvent.internal(): super.internal(); |
| 603 |
| 604 |
| 605 /** @domName AudioProcessingEvent.inputBuffer */ |
| 606 AudioBuffer get inputBuffer native "AudioProcessingEvent_inputBuffer_Getter"; |
| 607 |
| 608 |
| 609 /** @domName AudioProcessingEvent.outputBuffer */ |
| 610 AudioBuffer get outputBuffer native "AudioProcessingEvent_outputBuffer_Getter"
; |
| 611 |
| 612 } |
| 613 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 614 // for details. All rights reserved. Use of this source code is governed by a |
| 615 // BSD-style license that can be found in the LICENSE file. |
| 616 |
| 617 // WARNING: Do not edit - generated code. |
| 618 |
| 619 |
| 620 /// @domName AudioSourceNode |
| 621 class AudioSourceNode extends AudioNode { |
| 622 AudioSourceNode.internal(): super.internal(); |
| 623 |
| 624 } |
| 625 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 626 // for details. All rights reserved. Use of this source code is governed by a |
| 627 // BSD-style license that can be found in the LICENSE file. |
| 628 |
| 629 // WARNING: Do not edit - generated code. |
| 630 |
| 631 |
| 632 /// @domName BiquadFilterNode |
| 633 class BiquadFilterNode extends AudioNode { |
| 634 BiquadFilterNode.internal(): super.internal(); |
| 635 |
| 636 static const int ALLPASS = 7; |
| 637 |
| 638 static const int BANDPASS = 2; |
| 639 |
| 640 static const int HIGHPASS = 1; |
| 641 |
| 642 static const int HIGHSHELF = 4; |
| 643 |
| 644 static const int LOWPASS = 0; |
| 645 |
| 646 static const int LOWSHELF = 3; |
| 647 |
| 648 static const int NOTCH = 6; |
| 649 |
| 650 static const int PEAKING = 5; |
| 651 |
| 652 |
| 653 /** @domName BiquadFilterNode.Q */ |
| 654 AudioParam get Q native "BiquadFilterNode_Q_Getter"; |
| 655 |
| 656 |
| 657 /** @domName BiquadFilterNode.frequency */ |
| 658 AudioParam get frequency native "BiquadFilterNode_frequency_Getter"; |
| 659 |
| 660 |
| 661 /** @domName BiquadFilterNode.gain */ |
| 662 AudioParam get gain native "BiquadFilterNode_gain_Getter"; |
| 663 |
| 664 |
| 665 /** @domName BiquadFilterNode.type */ |
| 666 int get type native "BiquadFilterNode_type_Getter"; |
| 667 |
| 668 |
| 669 /** @domName BiquadFilterNode.type */ |
| 670 void set type(int value) native "BiquadFilterNode_type_Setter"; |
| 671 |
| 672 |
| 673 /** @domName BiquadFilterNode.getFrequencyResponse */ |
| 674 void getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse,
Float32Array phaseResponse) native "BiquadFilterNode_getFrequencyResponse_Callba
ck"; |
| 675 |
| 676 } |
| 677 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 678 // for details. All rights reserved. Use of this source code is governed by a |
| 679 // BSD-style license that can be found in the LICENSE file. |
| 680 |
| 681 // WARNING: Do not edit - generated code. |
| 682 |
| 683 |
| 684 /// @domName ChannelMergerNode |
| 685 class ChannelMergerNode extends AudioNode { |
| 686 ChannelMergerNode.internal(): super.internal(); |
| 687 |
| 688 } |
| 689 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 690 // for details. All rights reserved. Use of this source code is governed by a |
| 691 // BSD-style license that can be found in the LICENSE file. |
| 692 |
| 693 // WARNING: Do not edit - generated code. |
| 694 |
| 695 |
| 696 /// @domName ChannelSplitterNode |
| 697 class ChannelSplitterNode extends AudioNode { |
| 698 ChannelSplitterNode.internal(): super.internal(); |
| 699 |
| 700 } |
| 701 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 702 // for details. All rights reserved. Use of this source code is governed by a |
| 703 // BSD-style license that can be found in the LICENSE file. |
| 704 |
| 705 // WARNING: Do not edit - generated code. |
| 706 |
| 707 |
| 708 /// @domName ConvolverNode |
| 709 class ConvolverNode extends AudioNode { |
| 710 ConvolverNode.internal(): super.internal(); |
| 711 |
| 712 |
| 713 /** @domName ConvolverNode.buffer */ |
| 714 AudioBuffer get buffer native "ConvolverNode_buffer_Getter"; |
| 715 |
| 716 |
| 717 /** @domName ConvolverNode.buffer */ |
| 718 void set buffer(AudioBuffer value) native "ConvolverNode_buffer_Setter"; |
| 719 |
| 720 |
| 721 /** @domName ConvolverNode.normalize */ |
| 722 bool get normalize native "ConvolverNode_normalize_Getter"; |
| 723 |
| 724 |
| 725 /** @domName ConvolverNode.normalize */ |
| 726 void set normalize(bool value) native "ConvolverNode_normalize_Setter"; |
| 727 |
| 728 } |
| 729 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 730 // for details. All rights reserved. Use of this source code is governed by a |
| 731 // BSD-style license that can be found in the LICENSE file. |
| 732 |
| 733 // WARNING: Do not edit - generated code. |
| 734 |
| 735 |
| 736 /// @domName DelayNode |
| 737 class DelayNode extends AudioNode { |
| 738 DelayNode.internal(): super.internal(); |
| 739 |
| 740 |
| 741 /** @domName DelayNode.delayTime */ |
| 742 AudioParam get delayTime native "DelayNode_delayTime_Getter"; |
| 743 |
| 744 } |
| 745 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 746 // for details. All rights reserved. Use of this source code is governed by a |
| 747 // BSD-style license that can be found in the LICENSE file. |
| 748 |
| 749 // WARNING: Do not edit - generated code. |
| 750 |
| 751 |
| 752 /// @domName DynamicsCompressorNode |
| 753 class DynamicsCompressorNode extends AudioNode { |
| 754 DynamicsCompressorNode.internal(): super.internal(); |
| 755 |
| 756 |
| 757 /** @domName DynamicsCompressorNode.attack */ |
| 758 AudioParam get attack native "DynamicsCompressorNode_attack_Getter"; |
| 759 |
| 760 |
| 761 /** @domName DynamicsCompressorNode.knee */ |
| 762 AudioParam get knee native "DynamicsCompressorNode_knee_Getter"; |
| 763 |
| 764 |
| 765 /** @domName DynamicsCompressorNode.ratio */ |
| 766 AudioParam get ratio native "DynamicsCompressorNode_ratio_Getter"; |
| 767 |
| 768 |
| 769 /** @domName DynamicsCompressorNode.reduction */ |
| 770 AudioParam get reduction native "DynamicsCompressorNode_reduction_Getter"; |
| 771 |
| 772 |
| 773 /** @domName DynamicsCompressorNode.release */ |
| 774 AudioParam get release native "DynamicsCompressorNode_release_Getter"; |
| 775 |
| 776 |
| 777 /** @domName DynamicsCompressorNode.threshold */ |
| 778 AudioParam get threshold native "DynamicsCompressorNode_threshold_Getter"; |
| 779 |
| 780 } |
| 781 // 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 |
| 783 // BSD-style license that can be found in the LICENSE file. |
| 784 |
| 785 // WARNING: Do not edit - generated code. |
| 786 |
| 787 |
| 788 /// @domName GainNode |
| 789 class GainNode extends AudioNode { |
| 790 GainNode.internal(): super.internal(); |
| 791 |
| 792 |
| 793 /** @domName GainNode.gain */ |
| 794 AudioGain get gain native "GainNode_gain_Getter"; |
| 795 |
| 796 } |
| 797 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 798 // for details. All rights reserved. Use of this source code is governed by a |
| 799 // BSD-style license that can be found in the LICENSE file. |
| 800 |
| 801 // WARNING: Do not edit - generated code. |
| 802 |
| 803 |
| 804 /// @domName MediaElementAudioSourceNode |
| 805 class MediaElementAudioSourceNode extends AudioSourceNode { |
| 806 MediaElementAudioSourceNode.internal(): super.internal(); |
| 807 |
| 808 |
| 809 /** @domName MediaElementAudioSourceNode.mediaElement */ |
| 810 MediaElement get mediaElement native "MediaElementAudioSourceNode_mediaElement
_Getter"; |
| 811 |
| 812 } |
| 813 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 814 // for details. All rights reserved. Use of this source code is governed by a |
| 815 // BSD-style license that can be found in the LICENSE file. |
| 816 |
| 817 // WARNING: Do not edit - generated code. |
| 818 |
| 819 |
| 820 /// @domName MediaStreamAudioSourceNode |
| 821 class MediaStreamAudioSourceNode extends AudioSourceNode { |
| 822 MediaStreamAudioSourceNode.internal(): super.internal(); |
| 823 |
| 824 |
| 825 /** @domName MediaStreamAudioSourceNode.mediaStream */ |
| 826 MediaStream get mediaStream native "MediaStreamAudioSourceNode_mediaStream_Get
ter"; |
| 827 |
| 828 } |
| 829 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 830 // for details. All rights reserved. Use of this source code is governed by a |
| 831 // BSD-style license that can be found in the LICENSE file. |
| 832 |
| 833 // WARNING: Do not edit - generated code. |
| 834 |
| 835 |
| 836 /// @domName OfflineAudioCompletionEvent |
| 837 class OfflineAudioCompletionEvent extends Event { |
| 838 OfflineAudioCompletionEvent.internal(): super.internal(); |
| 839 |
| 840 |
| 841 /** @domName OfflineAudioCompletionEvent.renderedBuffer */ |
| 842 AudioBuffer get renderedBuffer native "OfflineAudioCompletionEvent_renderedBuf
fer_Getter"; |
| 843 |
| 844 } |
| 845 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 846 // for details. All rights reserved. Use of this source code is governed by a |
| 847 // BSD-style license that can be found in the LICENSE file. |
| 848 |
| 849 // WARNING: Do not edit - generated code. |
| 850 |
| 851 |
| 852 /// @domName OscillatorNode |
| 853 class OscillatorNode extends AudioSourceNode { |
| 854 OscillatorNode.internal(): super.internal(); |
| 855 |
| 856 static const int CUSTOM = 4; |
| 857 |
| 858 static const int FINISHED_STATE = 3; |
| 859 |
| 860 static const int PLAYING_STATE = 2; |
| 861 |
| 862 static const int SAWTOOTH = 2; |
| 863 |
| 864 static const int SCHEDULED_STATE = 1; |
| 865 |
| 866 static const int SINE = 0; |
| 867 |
| 868 static const int SQUARE = 1; |
| 869 |
| 870 static const int TRIANGLE = 3; |
| 871 |
| 872 static const int UNSCHEDULED_STATE = 0; |
| 873 |
| 874 |
| 875 /** @domName OscillatorNode.detune */ |
| 876 AudioParam get detune native "OscillatorNode_detune_Getter"; |
| 877 |
| 878 |
| 879 /** @domName OscillatorNode.frequency */ |
| 880 AudioParam get frequency native "OscillatorNode_frequency_Getter"; |
| 881 |
| 882 |
| 883 /** @domName OscillatorNode.playbackState */ |
| 884 int get playbackState native "OscillatorNode_playbackState_Getter"; |
| 885 |
| 886 |
| 887 /** @domName OscillatorNode.type */ |
| 888 int get type native "OscillatorNode_type_Getter"; |
| 889 |
| 890 |
| 891 /** @domName OscillatorNode.type */ |
| 892 void set type(int value) native "OscillatorNode_type_Setter"; |
| 893 |
| 894 |
| 895 /** @domName OscillatorNode.setWaveTable */ |
| 896 void setWaveTable(WaveTable waveTable) native "OscillatorNode_setWaveTable_Cal
lback"; |
| 897 |
| 898 |
| 899 /** @domName OscillatorNode.start */ |
| 900 void start(num when) native "OscillatorNode_start_Callback"; |
| 901 |
| 902 |
| 903 /** @domName OscillatorNode.stop */ |
| 904 void stop(num when) native "OscillatorNode_stop_Callback"; |
| 905 |
| 906 } |
| 907 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 908 // for details. All rights reserved. Use of this source code is governed by a |
| 909 // BSD-style license that can be found in the LICENSE file. |
| 910 |
| 911 // WARNING: Do not edit - generated code. |
| 912 |
| 913 |
| 914 /// @domName PannerNode |
| 915 class PannerNode extends AudioNode { |
| 916 PannerNode.internal(): super.internal(); |
| 917 |
| 918 static const int EQUALPOWER = 0; |
| 919 |
| 920 static const int EXPONENTIAL_DISTANCE = 2; |
| 921 |
| 922 static const int HRTF = 1; |
| 923 |
| 924 static const int INVERSE_DISTANCE = 1; |
| 925 |
| 926 static const int LINEAR_DISTANCE = 0; |
| 927 |
| 928 static const int SOUNDFIELD = 2; |
| 929 |
| 930 |
| 931 /** @domName PannerNode.coneGain */ |
| 932 AudioGain get coneGain native "PannerNode_coneGain_Getter"; |
| 933 |
| 934 |
| 935 /** @domName PannerNode.coneInnerAngle */ |
| 936 num get coneInnerAngle native "PannerNode_coneInnerAngle_Getter"; |
| 937 |
| 938 |
| 939 /** @domName PannerNode.coneInnerAngle */ |
| 940 void set coneInnerAngle(num value) native "PannerNode_coneInnerAngle_Setter"; |
| 941 |
| 942 |
| 943 /** @domName PannerNode.coneOuterAngle */ |
| 944 num get coneOuterAngle native "PannerNode_coneOuterAngle_Getter"; |
| 945 |
| 946 |
| 947 /** @domName PannerNode.coneOuterAngle */ |
| 948 void set coneOuterAngle(num value) native "PannerNode_coneOuterAngle_Setter"; |
| 949 |
| 950 |
| 951 /** @domName PannerNode.coneOuterGain */ |
| 952 num get coneOuterGain native "PannerNode_coneOuterGain_Getter"; |
| 953 |
| 954 |
| 955 /** @domName PannerNode.coneOuterGain */ |
| 956 void set coneOuterGain(num value) native "PannerNode_coneOuterGain_Setter"; |
| 957 |
| 958 |
| 959 /** @domName PannerNode.distanceGain */ |
| 960 AudioGain get distanceGain native "PannerNode_distanceGain_Getter"; |
| 961 |
| 962 |
| 963 /** @domName PannerNode.distanceModel */ |
| 964 int get distanceModel native "PannerNode_distanceModel_Getter"; |
| 965 |
| 966 |
| 967 /** @domName PannerNode.distanceModel */ |
| 968 void set distanceModel(int value) native "PannerNode_distanceModel_Setter"; |
| 969 |
| 970 |
| 971 /** @domName PannerNode.maxDistance */ |
| 972 num get maxDistance native "PannerNode_maxDistance_Getter"; |
| 973 |
| 974 |
| 975 /** @domName PannerNode.maxDistance */ |
| 976 void set maxDistance(num value) native "PannerNode_maxDistance_Setter"; |
| 977 |
| 978 |
| 979 /** @domName PannerNode.panningModel */ |
| 980 int get panningModel native "PannerNode_panningModel_Getter"; |
| 981 |
| 982 |
| 983 /** @domName PannerNode.panningModel */ |
| 984 void set panningModel(int value) native "PannerNode_panningModel_Setter"; |
| 985 |
| 986 |
| 987 /** @domName PannerNode.refDistance */ |
| 988 num get refDistance native "PannerNode_refDistance_Getter"; |
| 989 |
| 990 |
| 991 /** @domName PannerNode.refDistance */ |
| 992 void set refDistance(num value) native "PannerNode_refDistance_Setter"; |
| 993 |
| 994 |
| 995 /** @domName PannerNode.rolloffFactor */ |
| 996 num get rolloffFactor native "PannerNode_rolloffFactor_Getter"; |
| 997 |
| 998 |
| 999 /** @domName PannerNode.rolloffFactor */ |
| 1000 void set rolloffFactor(num value) native "PannerNode_rolloffFactor_Setter"; |
| 1001 |
| 1002 |
| 1003 /** @domName PannerNode.setOrientation */ |
| 1004 void setOrientation(num x, num y, num z) native "PannerNode_setOrientation_Cal
lback"; |
| 1005 |
| 1006 |
| 1007 /** @domName PannerNode.setPosition */ |
| 1008 void setPosition(num x, num y, num z) native "PannerNode_setPosition_Callback"
; |
| 1009 |
| 1010 |
| 1011 /** @domName PannerNode.setVelocity */ |
| 1012 void setVelocity(num x, num y, num z) native "PannerNode_setVelocity_Callback"
; |
| 1013 |
| 1014 } |
| 1015 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1016 // for details. All rights reserved. Use of this source code is governed by a |
| 1017 // BSD-style license that can be found in the LICENSE file. |
| 1018 |
| 1019 // WARNING: Do not edit - generated code. |
| 1020 |
| 1021 |
| 1022 /// @domName ScriptProcessorNode |
| 1023 class ScriptProcessorNode extends AudioNode implements EventTarget { |
| 1024 ScriptProcessorNode.internal(): super.internal(); |
| 1025 |
| 1026 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true |
| 1027 ScriptProcessorNodeEvents get on => |
| 1028 new ScriptProcessorNodeEvents(this); |
| 1029 |
| 1030 |
| 1031 /** @domName ScriptProcessorNode.bufferSize */ |
| 1032 int get bufferSize native "ScriptProcessorNode_bufferSize_Getter"; |
| 1033 |
| 1034 } |
| 1035 |
| 1036 class ScriptProcessorNodeEvents extends Events { |
| 1037 ScriptProcessorNodeEvents(EventTarget _ptr) : super(_ptr); |
| 1038 |
| 1039 EventListenerList get audioProcess => this['audioprocess']; |
| 1040 } |
| 1041 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1042 // for details. All rights reserved. Use of this source code is governed by a |
| 1043 // BSD-style license that can be found in the LICENSE file. |
| 1044 |
| 1045 // WARNING: Do not edit - generated code. |
| 1046 |
| 1047 |
| 1048 /// @domName WaveShaperNode |
| 1049 class WaveShaperNode extends AudioNode { |
| 1050 WaveShaperNode.internal(): super.internal(); |
| 1051 |
| 1052 |
| 1053 /** @domName WaveShaperNode.curve */ |
| 1054 Float32Array get curve native "WaveShaperNode_curve_Getter"; |
| 1055 |
| 1056 |
| 1057 /** @domName WaveShaperNode.curve */ |
| 1058 void set curve(Float32Array value) native "WaveShaperNode_curve_Setter"; |
| 1059 |
| 1060 } |
| 1061 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1062 // for details. All rights reserved. Use of this source code is governed by a |
| 1063 // BSD-style license that can be found in the LICENSE file. |
| 1064 |
| 1065 |
| 1066 class _AudioElementFactoryProvider { |
| 1067 static AudioElement createAudioElement([String src]) native "HTMLAudioElement_
constructor_Callback"; |
| 1068 } |
OLD | NEW |