| 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:_internal' hide deprecated; | 5 import 'dart:_internal' hide deprecated; |
| 6 import 'dart:html'; | 6 import 'dart:html'; |
| 7 import 'dart:html_common'; | 7 import 'dart:html_common'; |
| 8 import 'dart:nativewrappers'; | 8 import 'dart:nativewrappers'; |
| 9 import 'dart:typed_data'; | 9 import 'dart:typed_data'; |
| 10 import 'dart:_blink' as _blink; | 10 import 'dart:_blink' as _blink; |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 void noteGrainOn(num when, num grainOffset, num grainDuration) => _blink.Nativ
e_AudioBufferSourceNode_noteGrainOn_Callback(this, when, grainOffset, grainDurat
ion); | 224 void noteGrainOn(num when, num grainOffset, num grainDuration) => _blink.Nativ
e_AudioBufferSourceNode_noteGrainOn_Callback(this, when, grainOffset, grainDurat
ion); |
| 225 | 225 |
| 226 @DomName('AudioBufferSourceNode.noteOff') | 226 @DomName('AudioBufferSourceNode.noteOff') |
| 227 @DocsEditable() | 227 @DocsEditable() |
| 228 void noteOff(num when) => _blink.Native_AudioBufferSourceNode_noteOff_Callback
(this, when); | 228 void noteOff(num when) => _blink.Native_AudioBufferSourceNode_noteOff_Callback
(this, when); |
| 229 | 229 |
| 230 @DomName('AudioBufferSourceNode.noteOn') | 230 @DomName('AudioBufferSourceNode.noteOn') |
| 231 @DocsEditable() | 231 @DocsEditable() |
| 232 void noteOn(num when) => _blink.Native_AudioBufferSourceNode_noteOn_Callback(t
his, when); | 232 void noteOn(num when) => _blink.Native_AudioBufferSourceNode_noteOn_Callback(t
his, when); |
| 233 | 233 |
| 234 void start([num when, num grainOffset, num grainDuration]) { | 234 void start([num when, num grainOffset, num grainDuration]) => _blink.Native_Au
dioBufferSourceNode_start(this, when, grainOffset, grainDuration); |
| 235 if (grainDuration != null) { | |
| 236 _start_1(when, grainOffset, grainDuration); | |
| 237 return; | |
| 238 } | |
| 239 if (grainOffset != null) { | |
| 240 _start_2(when, grainOffset); | |
| 241 return; | |
| 242 } | |
| 243 if (when != null) { | |
| 244 _start_3(when); | |
| 245 return; | |
| 246 } | |
| 247 _start_4(); | |
| 248 return; | |
| 249 } | |
| 250 | 235 |
| 251 void _start_1(when, grainOffset, grainDuration) => _blink.Native_AudioBufferSo
urceNode__start_1_Callback(this, when, grainOffset, grainDuration); | 236 void stop([num when]) => _blink.Native_AudioBufferSourceNode_stop(this, when); |
| 252 | |
| 253 void _start_2(when, grainOffset) => _blink.Native_AudioBufferSourceNode__start
_2_Callback(this, when, grainOffset); | |
| 254 | |
| 255 void _start_3(when) => _blink.Native_AudioBufferSourceNode__start_3_Callback(t
his, when); | |
| 256 | |
| 257 void _start_4() => _blink.Native_AudioBufferSourceNode__start_4_Callback(this)
; | |
| 258 | |
| 259 void stop([num when]) { | |
| 260 if (when != null) { | |
| 261 _stop_1(when); | |
| 262 return; | |
| 263 } | |
| 264 _stop_2(); | |
| 265 return; | |
| 266 } | |
| 267 | |
| 268 void _stop_1(when) => _blink.Native_AudioBufferSourceNode__stop_1_Callback(thi
s, when); | |
| 269 | |
| 270 void _stop_2() => _blink.Native_AudioBufferSourceNode__stop_2_Callback(this); | |
| 271 | 237 |
| 272 /// Stream of `ended` events handled by this [AudioBufferSourceNode]. | 238 /// Stream of `ended` events handled by this [AudioBufferSourceNode]. |
| 273 @DomName('AudioBufferSourceNode.onended') | 239 @DomName('AudioBufferSourceNode.onended') |
| 274 @DocsEditable() | 240 @DocsEditable() |
| 275 @Experimental() // untriaged | 241 @Experimental() // untriaged |
| 276 Stream<Event> get onEnded => endedEvent.forTarget(this); | 242 Stream<Event> get onEnded => endedEvent.forTarget(this); |
| 277 | 243 |
| 278 } | 244 } |
| 279 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 245 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 280 // for details. All rights reserved. Use of this source code is governed by a | 246 // for details. All rights reserved. Use of this source code is governed by a |
| (...skipping 12 matching lines...) Expand all Loading... |
| 293 * handlers that are not necessarily instances of [AudioContext]. | 259 * handlers that are not necessarily instances of [AudioContext]. |
| 294 * | 260 * |
| 295 * See [EventStreamProvider] for usage information. | 261 * See [EventStreamProvider] for usage information. |
| 296 */ | 262 */ |
| 297 @DomName('AudioContext.completeEvent') | 263 @DomName('AudioContext.completeEvent') |
| 298 @DocsEditable() | 264 @DocsEditable() |
| 299 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi
der<Event>('complete'); | 265 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi
der<Event>('complete'); |
| 300 | 266 |
| 301 @DomName('AudioContext.AudioContext') | 267 @DomName('AudioContext.AudioContext') |
| 302 @DocsEditable() | 268 @DocsEditable() |
| 303 factory AudioContext() { | 269 factory AudioContext() => _blink.Native_AudioContext_AudioContext(); |
| 304 return AudioContext._create_1(); | |
| 305 } | |
| 306 | |
| 307 @DocsEditable() | |
| 308 static AudioContext _create_1() => _blink.Native_AudioContext__create_1constru
ctorCallback(); | |
| 309 | 270 |
| 310 /// Checks if this type is supported on the current platform. | 271 /// Checks if this type is supported on the current platform. |
| 311 static bool get supported => true; | 272 static bool get supported => true; |
| 312 | 273 |
| 313 @DomName('AudioContext.activeSourceCount') | 274 @DomName('AudioContext.activeSourceCount') |
| 314 @DocsEditable() | 275 @DocsEditable() |
| 315 int get activeSourceCount => _blink.Native_AudioContext_activeSourceCount_Gett
er(this); | 276 int get activeSourceCount => _blink.Native_AudioContext_activeSourceCount_Gett
er(this); |
| 316 | 277 |
| 317 @DomName('AudioContext.currentTime') | 278 @DomName('AudioContext.currentTime') |
| 318 @DocsEditable() | 279 @DocsEditable() |
| (...skipping 24 matching lines...) Expand all Loading... |
| 343 AudioBuffer createBuffer(int numberOfChannels, int numberOfFrames, num sampleR
ate) => _blink.Native_AudioContext_createBuffer_Callback(this, numberOfChannels,
numberOfFrames, sampleRate); | 304 AudioBuffer createBuffer(int numberOfChannels, int numberOfFrames, num sampleR
ate) => _blink.Native_AudioContext_createBuffer_Callback(this, numberOfChannels,
numberOfFrames, sampleRate); |
| 344 | 305 |
| 345 @DomName('AudioContext.createBufferFromBuffer') | 306 @DomName('AudioContext.createBufferFromBuffer') |
| 346 @DocsEditable() | 307 @DocsEditable() |
| 347 AudioBuffer createBufferFromBuffer(ByteBuffer buffer, bool mixToMono) => _blin
k.Native_AudioContext_createBufferFromBuffer_Callback(this, buffer, mixToMono); | 308 AudioBuffer createBufferFromBuffer(ByteBuffer buffer, bool mixToMono) => _blin
k.Native_AudioContext_createBufferFromBuffer_Callback(this, buffer, mixToMono); |
| 348 | 309 |
| 349 @DomName('AudioContext.createBufferSource') | 310 @DomName('AudioContext.createBufferSource') |
| 350 @DocsEditable() | 311 @DocsEditable() |
| 351 AudioBufferSourceNode createBufferSource() => _blink.Native_AudioContext_creat
eBufferSource_Callback(this); | 312 AudioBufferSourceNode createBufferSource() => _blink.Native_AudioContext_creat
eBufferSource_Callback(this); |
| 352 | 313 |
| 353 ChannelMergerNode createChannelMerger([int numberOfInputs]) { | 314 ChannelMergerNode createChannelMerger([int numberOfInputs]) => _blink.Native_A
udioContext_createChannelMerger(this, numberOfInputs); |
| 354 if (numberOfInputs != null) { | |
| 355 return _createChannelMerger_1(numberOfInputs); | |
| 356 } | |
| 357 return _createChannelMerger_2(); | |
| 358 } | |
| 359 | 315 |
| 360 ChannelMergerNode _createChannelMerger_1(numberOfInputs) => _blink.Native_Audi
oContext__createChannelMerger_1_Callback(this, numberOfInputs); | 316 ChannelSplitterNode createChannelSplitter([int numberOfOutputs]) => _blink.Nat
ive_AudioContext_createChannelSplitter(this, numberOfOutputs); |
| 361 | |
| 362 ChannelMergerNode _createChannelMerger_2() => _blink.Native_AudioContext__crea
teChannelMerger_2_Callback(this); | |
| 363 | |
| 364 ChannelSplitterNode createChannelSplitter([int numberOfOutputs]) { | |
| 365 if (numberOfOutputs != null) { | |
| 366 return _createChannelSplitter_1(numberOfOutputs); | |
| 367 } | |
| 368 return _createChannelSplitter_2(); | |
| 369 } | |
| 370 | |
| 371 ChannelSplitterNode _createChannelSplitter_1(numberOfOutputs) => _blink.Native
_AudioContext__createChannelSplitter_1_Callback(this, numberOfOutputs); | |
| 372 | |
| 373 ChannelSplitterNode _createChannelSplitter_2() => _blink.Native_AudioContext__
createChannelSplitter_2_Callback(this); | |
| 374 | 317 |
| 375 @DomName('AudioContext.createConvolver') | 318 @DomName('AudioContext.createConvolver') |
| 376 @DocsEditable() | 319 @DocsEditable() |
| 377 ConvolverNode createConvolver() => _blink.Native_AudioContext_createConvolver_
Callback(this); | 320 ConvolverNode createConvolver() => _blink.Native_AudioContext_createConvolver_
Callback(this); |
| 378 | 321 |
| 379 DelayNode createDelay([num maxDelayTime]) { | 322 DelayNode createDelay([num maxDelayTime]) => _blink.Native_AudioContext_create
Delay(this, maxDelayTime); |
| 380 if (maxDelayTime != null) { | |
| 381 return _createDelay_1(maxDelayTime); | |
| 382 } | |
| 383 return _createDelay_2(); | |
| 384 } | |
| 385 | 323 |
| 386 DelayNode _createDelay_1(maxDelayTime) => _blink.Native_AudioContext__createDe
lay_1_Callback(this, maxDelayTime); | 324 DelayNode createDelayNode([num maxDelayTime]) => _blink.Native_AudioContext_cr
eateDelayNode(this, maxDelayTime); |
| 387 | |
| 388 DelayNode _createDelay_2() => _blink.Native_AudioContext__createDelay_2_Callba
ck(this); | |
| 389 | |
| 390 DelayNode createDelayNode([num maxDelayTime]) { | |
| 391 if (maxDelayTime != null) { | |
| 392 return _createDelayNode_1(maxDelayTime); | |
| 393 } | |
| 394 return _createDelayNode_2(); | |
| 395 } | |
| 396 | |
| 397 DelayNode _createDelayNode_1(maxDelayTime) => _blink.Native_AudioContext__crea
teDelayNode_1_Callback(this, maxDelayTime); | |
| 398 | |
| 399 DelayNode _createDelayNode_2() => _blink.Native_AudioContext__createDelayNode_
2_Callback(this); | |
| 400 | 325 |
| 401 @DomName('AudioContext.createDynamicsCompressor') | 326 @DomName('AudioContext.createDynamicsCompressor') |
| 402 @DocsEditable() | 327 @DocsEditable() |
| 403 DynamicsCompressorNode createDynamicsCompressor() => _blink.Native_AudioContex
t_createDynamicsCompressor_Callback(this); | 328 DynamicsCompressorNode createDynamicsCompressor() => _blink.Native_AudioContex
t_createDynamicsCompressor_Callback(this); |
| 404 | 329 |
| 405 @DomName('AudioContext.createGain') | 330 @DomName('AudioContext.createGain') |
| 406 @DocsEditable() | 331 @DocsEditable() |
| 407 GainNode createGain() => _blink.Native_AudioContext_createGain_Callback(this); | 332 GainNode createGain() => _blink.Native_AudioContext_createGain_Callback(this); |
| 408 | 333 |
| 409 @DomName('AudioContext.createGainNode') | 334 @DomName('AudioContext.createGainNode') |
| 410 @DocsEditable() | 335 @DocsEditable() |
| 411 GainNode createGainNode() => _blink.Native_AudioContext_createGainNode_Callbac
k(this); | 336 GainNode createGainNode() => _blink.Native_AudioContext_createGainNode_Callbac
k(this); |
| 412 | 337 |
| 413 ScriptProcessorNode createJavaScriptNode(int bufferSize, [int numberOfInputCha
nnels, int numberOfOutputChannels]) { | 338 ScriptProcessorNode createJavaScriptNode(int bufferSize, [int numberOfInputCha
nnels, int numberOfOutputChannels]) => _blink.Native_AudioContext_createJavaScri
ptNode(this, bufferSize, numberOfInputChannels, numberOfOutputChannels); |
| 414 if (numberOfOutputChannels != null) { | |
| 415 return _createJavaScriptNode_1(bufferSize, numberOfInputChannels, numberOf
OutputChannels); | |
| 416 } | |
| 417 if (numberOfInputChannels != null) { | |
| 418 return _createJavaScriptNode_2(bufferSize, numberOfInputChannels); | |
| 419 } | |
| 420 return _createJavaScriptNode_3(bufferSize); | |
| 421 } | |
| 422 | |
| 423 ScriptProcessorNode _createJavaScriptNode_1(bufferSize, numberOfInputChannels,
numberOfOutputChannels) => _blink.Native_AudioContext__createJavaScriptNode_1_C
allback(this, bufferSize, numberOfInputChannels, numberOfOutputChannels); | |
| 424 | |
| 425 ScriptProcessorNode _createJavaScriptNode_2(bufferSize, numberOfInputChannels)
=> _blink.Native_AudioContext__createJavaScriptNode_2_Callback(this, bufferSize
, numberOfInputChannels); | |
| 426 | |
| 427 ScriptProcessorNode _createJavaScriptNode_3(bufferSize) => _blink.Native_Audio
Context__createJavaScriptNode_3_Callback(this, bufferSize); | |
| 428 | 339 |
| 429 @DomName('AudioContext.createMediaElementSource') | 340 @DomName('AudioContext.createMediaElementSource') |
| 430 @DocsEditable() | 341 @DocsEditable() |
| 431 MediaElementAudioSourceNode createMediaElementSource(MediaElement mediaElement
) => _blink.Native_AudioContext_createMediaElementSource_Callback(this, mediaEle
ment); | 342 MediaElementAudioSourceNode createMediaElementSource(MediaElement mediaElement
) => _blink.Native_AudioContext_createMediaElementSource_Callback(this, mediaEle
ment); |
| 432 | 343 |
| 433 @DomName('AudioContext.createMediaStreamDestination') | 344 @DomName('AudioContext.createMediaStreamDestination') |
| 434 @DocsEditable() | 345 @DocsEditable() |
| 435 MediaStreamAudioDestinationNode createMediaStreamDestination() => _blink.Nativ
e_AudioContext_createMediaStreamDestination_Callback(this); | 346 MediaStreamAudioDestinationNode createMediaStreamDestination() => _blink.Nativ
e_AudioContext_createMediaStreamDestination_Callback(this); |
| 436 | 347 |
| 437 @DomName('AudioContext.createMediaStreamSource') | 348 @DomName('AudioContext.createMediaStreamSource') |
| 438 @DocsEditable() | 349 @DocsEditable() |
| 439 MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream) =>
_blink.Native_AudioContext_createMediaStreamSource_Callback(this, mediaStream); | 350 MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream) =>
_blink.Native_AudioContext_createMediaStreamSource_Callback(this, mediaStream); |
| 440 | 351 |
| 441 @DomName('AudioContext.createOscillator') | 352 @DomName('AudioContext.createOscillator') |
| 442 @DocsEditable() | 353 @DocsEditable() |
| 443 OscillatorNode createOscillator() => _blink.Native_AudioContext_createOscillat
or_Callback(this); | 354 OscillatorNode createOscillator() => _blink.Native_AudioContext_createOscillat
or_Callback(this); |
| 444 | 355 |
| 445 @DomName('AudioContext.createPanner') | 356 @DomName('AudioContext.createPanner') |
| 446 @DocsEditable() | 357 @DocsEditable() |
| 447 PannerNode createPanner() => _blink.Native_AudioContext_createPanner_Callback(
this); | 358 PannerNode createPanner() => _blink.Native_AudioContext_createPanner_Callback(
this); |
| 448 | 359 |
| 449 @DomName('AudioContext.createPeriodicWave') | 360 @DomName('AudioContext.createPeriodicWave') |
| 450 @DocsEditable() | 361 @DocsEditable() |
| 451 @Experimental() // untriaged | 362 @Experimental() // untriaged |
| 452 PeriodicWave createPeriodicWave(Float32List real, Float32List imag) => _blink.
Native_AudioContext_createPeriodicWave_Callback(this, real, imag); | 363 PeriodicWave createPeriodicWave(Float32List real, Float32List imag) => _blink.
Native_AudioContext_createPeriodicWave_Callback(this, real, imag); |
| 453 | 364 |
| 454 ScriptProcessorNode createScriptProcessor([int bufferSize, int numberOfInputCh
annels, int numberOfOutputChannels]) { | 365 ScriptProcessorNode createScriptProcessor([int bufferSize, int numberOfInputCh
annels, int numberOfOutputChannels]) => _blink.Native_AudioContext_createScriptP
rocessor(this, bufferSize, numberOfInputChannels, numberOfOutputChannels); |
| 455 if (numberOfOutputChannels != null) { | |
| 456 return _createScriptProcessor_1(bufferSize, numberOfInputChannels, numberO
fOutputChannels); | |
| 457 } | |
| 458 if (numberOfInputChannels != null) { | |
| 459 return _createScriptProcessor_2(bufferSize, numberOfInputChannels); | |
| 460 } | |
| 461 if (bufferSize != null) { | |
| 462 return _createScriptProcessor_3(bufferSize); | |
| 463 } | |
| 464 return _createScriptProcessor_4(); | |
| 465 } | |
| 466 | |
| 467 ScriptProcessorNode _createScriptProcessor_1(bufferSize, numberOfInputChannels
, numberOfOutputChannels) => _blink.Native_AudioContext__createScriptProcessor_1
_Callback(this, bufferSize, numberOfInputChannels, numberOfOutputChannels); | |
| 468 | |
| 469 ScriptProcessorNode _createScriptProcessor_2(bufferSize, numberOfInputChannels
) => _blink.Native_AudioContext__createScriptProcessor_2_Callback(this, bufferSi
ze, numberOfInputChannels); | |
| 470 | |
| 471 ScriptProcessorNode _createScriptProcessor_3(bufferSize) => _blink.Native_Audi
oContext__createScriptProcessor_3_Callback(this, bufferSize); | |
| 472 | |
| 473 ScriptProcessorNode _createScriptProcessor_4() => _blink.Native_AudioContext__
createScriptProcessor_4_Callback(this); | |
| 474 | 366 |
| 475 @DomName('AudioContext.createWaveShaper') | 367 @DomName('AudioContext.createWaveShaper') |
| 476 @DocsEditable() | 368 @DocsEditable() |
| 477 WaveShaperNode createWaveShaper() => _blink.Native_AudioContext_createWaveShap
er_Callback(this); | 369 WaveShaperNode createWaveShaper() => _blink.Native_AudioContext_createWaveShap
er_Callback(this); |
| 478 | 370 |
| 479 @DomName('AudioContext.decodeAudioData') | 371 @DomName('AudioContext.decodeAudioData') |
| 480 @DocsEditable() | 372 @DocsEditable() |
| 481 void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallbac
k, [AudioBufferCallback errorCallback]) => _blink.Native_AudioContext_decodeAudi
oData_Callback(this, audioData, successCallback, errorCallback); | 373 void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallbac
k, [AudioBufferCallback errorCallback]) => _blink.Native_AudioContext_decodeAudi
oData_Callback(this, audioData, successCallback, errorCallback); |
| 482 | 374 |
| 483 @DomName('AudioContext.startRendering') | 375 @DomName('AudioContext.startRendering') |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 AudioContext get context => _blink.Native_AudioNode_context_Getter(this); | 516 AudioContext get context => _blink.Native_AudioNode_context_Getter(this); |
| 625 | 517 |
| 626 @DomName('AudioNode.numberOfInputs') | 518 @DomName('AudioNode.numberOfInputs') |
| 627 @DocsEditable() | 519 @DocsEditable() |
| 628 int get numberOfInputs => _blink.Native_AudioNode_numberOfInputs_Getter(this); | 520 int get numberOfInputs => _blink.Native_AudioNode_numberOfInputs_Getter(this); |
| 629 | 521 |
| 630 @DomName('AudioNode.numberOfOutputs') | 522 @DomName('AudioNode.numberOfOutputs') |
| 631 @DocsEditable() | 523 @DocsEditable() |
| 632 int get numberOfOutputs => _blink.Native_AudioNode_numberOfOutputs_Getter(this
); | 524 int get numberOfOutputs => _blink.Native_AudioNode_numberOfOutputs_Getter(this
); |
| 633 | 525 |
| 634 void _connect(destination, int output, [int input]) { | 526 void _connect(destination, int output, [int input]) => _blink.Native_AudioNode
__connect(this, destination, output, input); |
| 635 if ((input is int || input == null) && (output is int || output == null) &&
(destination is AudioNode || destination == null)) { | |
| 636 _connect_1(destination, output, input); | |
| 637 return; | |
| 638 } | |
| 639 if ((output is int || output == null) && (destination is AudioParam || desti
nation == null) && input == null) { | |
| 640 _connect_2(destination, output); | |
| 641 return; | |
| 642 } | |
| 643 throw new ArgumentError("Incorrect number or type of arguments"); | |
| 644 } | |
| 645 | |
| 646 void _connect_1(destination, output, input) => _blink.Native_AudioNode__connec
t_1_Callback(this, destination, output, input); | |
| 647 | |
| 648 void _connect_2(destination, output) => _blink.Native_AudioNode__connect_2_Cal
lback(this, destination, output); | |
| 649 | 527 |
| 650 @DomName('AudioNode.disconnect') | 528 @DomName('AudioNode.disconnect') |
| 651 @DocsEditable() | 529 @DocsEditable() |
| 652 void disconnect(int output) => _blink.Native_AudioNode_disconnect_Callback(thi
s, output); | 530 void disconnect(int output) => _blink.Native_AudioNode_disconnect_Callback(thi
s, output); |
| 653 | 531 |
| 654 @DomName('AudioNode.addEventListener') | 532 @DomName('AudioNode.addEventListener') |
| 655 @DocsEditable() | 533 @DocsEditable() |
| 656 void addEventListener(String type, EventListener listener, [bool useCapture])
=> _blink.Native_AudioNode_addEventListener_Callback(this, type, listener, useCa
pture); | 534 void addEventListener(String type, EventListener listener, [bool useCapture])
=> _blink.Native_AudioNode_addEventListener_Callback(this, type, listener, useCa
pture); |
| 657 | 535 |
| 658 @DomName('AudioNode.dispatchEvent') | 536 @DomName('AudioNode.dispatchEvent') |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 @DocsEditable() | 972 @DocsEditable() |
| 1095 @DomName('OfflineAudioContext') | 973 @DomName('OfflineAudioContext') |
| 1096 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Offline
AudioContext-section | 974 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Offline
AudioContext-section |
| 1097 @Experimental() | 975 @Experimental() |
| 1098 class OfflineAudioContext extends AudioContext { | 976 class OfflineAudioContext extends AudioContext { |
| 1099 // To suppress missing implicit constructor warnings. | 977 // To suppress missing implicit constructor warnings. |
| 1100 factory OfflineAudioContext._() { throw new UnsupportedError("Not supported");
} | 978 factory OfflineAudioContext._() { throw new UnsupportedError("Not supported");
} |
| 1101 | 979 |
| 1102 @DomName('OfflineAudioContext.OfflineAudioContext') | 980 @DomName('OfflineAudioContext.OfflineAudioContext') |
| 1103 @DocsEditable() | 981 @DocsEditable() |
| 1104 factory OfflineAudioContext(int numberOfChannels, int numberOfFrames, num samp
leRate) { | 982 factory OfflineAudioContext(int numberOfChannels, int numberOfFrames, num samp
leRate) => _blink.Native_OfflineAudioContext_OfflineAudioContext(numberOfChannel
s, numberOfFrames, sampleRate); |
| 1105 return OfflineAudioContext._create_1(numberOfChannels, numberOfFrames, sampl
eRate); | |
| 1106 } | |
| 1107 | |
| 1108 @DocsEditable() | |
| 1109 static OfflineAudioContext _create_1(numberOfChannels, numberOfFrames, sampleR
ate) => _blink.Native_OfflineAudioContext__create_1constructorCallback(numberOfC
hannels, numberOfFrames, sampleRate); | |
| 1110 | 983 |
| 1111 } | 984 } |
| 1112 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 985 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1113 // for details. All rights reserved. Use of this source code is governed by a | 986 // for details. All rights reserved. Use of this source code is governed by a |
| 1114 // BSD-style license that can be found in the LICENSE file. | 987 // BSD-style license that can be found in the LICENSE file. |
| 1115 | 988 |
| 1116 // WARNING: Do not edit - generated code. | 989 // WARNING: Do not edit - generated code. |
| 1117 | 990 |
| 1118 | 991 |
| 1119 @DocsEditable() | 992 @DocsEditable() |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 | 1050 |
| 1178 @DomName('OscillatorNode.noteOn') | 1051 @DomName('OscillatorNode.noteOn') |
| 1179 @DocsEditable() | 1052 @DocsEditable() |
| 1180 void noteOn(num when) => _blink.Native_OscillatorNode_noteOn_Callback(this, wh
en); | 1053 void noteOn(num when) => _blink.Native_OscillatorNode_noteOn_Callback(this, wh
en); |
| 1181 | 1054 |
| 1182 @DomName('OscillatorNode.setPeriodicWave') | 1055 @DomName('OscillatorNode.setPeriodicWave') |
| 1183 @DocsEditable() | 1056 @DocsEditable() |
| 1184 @Experimental() // untriaged | 1057 @Experimental() // untriaged |
| 1185 void setPeriodicWave(PeriodicWave periodicWave) => _blink.Native_OscillatorNod
e_setPeriodicWave_Callback(this, periodicWave); | 1058 void setPeriodicWave(PeriodicWave periodicWave) => _blink.Native_OscillatorNod
e_setPeriodicWave_Callback(this, periodicWave); |
| 1186 | 1059 |
| 1187 void start([num when]) { | 1060 void start([num when]) => _blink.Native_OscillatorNode_start(this, when); |
| 1188 if (when != null) { | |
| 1189 _start_1(when); | |
| 1190 return; | |
| 1191 } | |
| 1192 _start_2(); | |
| 1193 return; | |
| 1194 } | |
| 1195 | 1061 |
| 1196 void _start_1(when) => _blink.Native_OscillatorNode__start_1_Callback(this, wh
en); | 1062 void stop([num when]) => _blink.Native_OscillatorNode_stop(this, when); |
| 1197 | |
| 1198 void _start_2() => _blink.Native_OscillatorNode__start_2_Callback(this); | |
| 1199 | |
| 1200 void stop([num when]) { | |
| 1201 if (when != null) { | |
| 1202 _stop_1(when); | |
| 1203 return; | |
| 1204 } | |
| 1205 _stop_2(); | |
| 1206 return; | |
| 1207 } | |
| 1208 | |
| 1209 void _stop_1(when) => _blink.Native_OscillatorNode__stop_1_Callback(this, when
); | |
| 1210 | |
| 1211 void _stop_2() => _blink.Native_OscillatorNode__stop_2_Callback(this); | |
| 1212 | 1063 |
| 1213 /// Stream of `ended` events handled by this [OscillatorNode]. | 1064 /// Stream of `ended` events handled by this [OscillatorNode]. |
| 1214 @DomName('OscillatorNode.onended') | 1065 @DomName('OscillatorNode.onended') |
| 1215 @DocsEditable() | 1066 @DocsEditable() |
| 1216 @Experimental() // untriaged | 1067 @Experimental() // untriaged |
| 1217 Stream<Event> get onEnded => endedEvent.forTarget(this); | 1068 Stream<Event> get onEnded => endedEvent.forTarget(this); |
| 1218 | 1069 |
| 1219 } | 1070 } |
| 1220 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1071 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1221 // for details. All rights reserved. Use of this source code is governed by a | 1072 // for details. All rights reserved. Use of this source code is governed by a |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1398 | 1249 |
| 1399 @DomName('WaveShaperNode.oversample') | 1250 @DomName('WaveShaperNode.oversample') |
| 1400 @DocsEditable() | 1251 @DocsEditable() |
| 1401 String get oversample => _blink.Native_WaveShaperNode_oversample_Getter(this); | 1252 String get oversample => _blink.Native_WaveShaperNode_oversample_Getter(this); |
| 1402 | 1253 |
| 1403 @DomName('WaveShaperNode.oversample') | 1254 @DomName('WaveShaperNode.oversample') |
| 1404 @DocsEditable() | 1255 @DocsEditable() |
| 1405 void set oversample(String value) => _blink.Native_WaveShaperNode_oversample_S
etter(this, value); | 1256 void set oversample(String value) => _blink.Native_WaveShaperNode_oversample_S
etter(this, value); |
| 1406 | 1257 |
| 1407 } | 1258 } |
| OLD | NEW |