| OLD | NEW |
| 1 library web_audio; | 1 library 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'; | 5 import 'dart:collection-dev'; |
| 6 import 'dart:html'; | 6 import 'dart:html'; |
| 7 import 'dart:html_common'; | 7 import 'dart:html_common'; |
| 8 import 'dart:_foreign_helper' show JS; | 8 import 'dart:_foreign_helper' show JS; |
| 9 // DO NOT EDIT | 9 // DO NOT EDIT |
| 10 // Auto-generated dart:audio library. | 10 // Auto-generated dart:audio library. |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 175 |
| 176 | 176 |
| 177 @DomName('AudioContext') | 177 @DomName('AudioContext') |
| 178 class AudioContext extends EventTarget native "*AudioContext" { | 178 class AudioContext extends EventTarget native "*AudioContext" { |
| 179 | 179 |
| 180 @DomName('AudioContext.complete') | 180 @DomName('AudioContext.complete') |
| 181 @DocsEditable | 181 @DocsEditable |
| 182 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi
der<Event>('complete'); | 182 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi
der<Event>('complete'); |
| 183 | 183 |
| 184 @DocsEditable | 184 @DocsEditable |
| 185 factory AudioContext() => AudioContext._create(); | |
| 186 | |
| 187 @DocsEditable | |
| 188 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') | 185 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') |
| 189 @deprecated | 186 @deprecated |
| 190 AudioContextEvents get on => | 187 AudioContextEvents get on => |
| 191 new AudioContextEvents(this); | 188 new AudioContextEvents(this); |
| 192 | 189 |
| 193 @DomName('AudioContext.activeSourceCount') | 190 @DomName('AudioContext.activeSourceCount') |
| 194 @DocsEditable | 191 @DocsEditable |
| 195 final int activeSourceCount; | 192 final int activeSourceCount; |
| 196 | 193 |
| 197 @DomName('AudioContext.currentTime') | 194 @DomName('AudioContext.currentTime') |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 void decodeAudioData(ArrayBuffer audioData, AudioBufferCallback successCallbac
k, [AudioBufferCallback errorCallback]) native; | 276 void decodeAudioData(ArrayBuffer audioData, AudioBufferCallback successCallbac
k, [AudioBufferCallback errorCallback]) native; |
| 280 | 277 |
| 281 @DomName('AudioContext.startRendering') | 278 @DomName('AudioContext.startRendering') |
| 282 @DocsEditable | 279 @DocsEditable |
| 283 void startRendering() native; | 280 void startRendering() native; |
| 284 | 281 |
| 285 @DomName('AudioContext.complete') | 282 @DomName('AudioContext.complete') |
| 286 @DocsEditable | 283 @DocsEditable |
| 287 Stream<Event> get onComplete => completeEvent.forTarget(this); | 284 Stream<Event> get onComplete => completeEvent.forTarget(this); |
| 288 | 285 |
| 289 static AudioContext _create() => JS('AudioContext', | 286 factory AudioContext() => JS('AudioContext', |
| 290 'new (window.AudioContext || window.webkitAudioContext)()'); | 287 'new (window.AudioContext || window.webkitAudioContext)()'); |
| 291 | 288 |
| 292 GainNode createGain() { | 289 GainNode createGain() { |
| 293 if (JS('bool', '#.createGain !== undefined', this)) { | 290 if (JS('bool', '#.createGain !== undefined', this)) { |
| 294 return JS('GainNode', '#.createGain()', this); | 291 return JS('GainNode', '#.createGain()', this); |
| 295 } else { | 292 } else { |
| 296 return JS('GainNode', '#.createGainNode()', this); | 293 return JS('GainNode', '#.createGainNode()', this); |
| 297 } | 294 } |
| 298 } | 295 } |
| 299 | 296 |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 681 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 685 // for details. All rights reserved. Use of this source code is governed by a | 682 // for details. All rights reserved. Use of this source code is governed by a |
| 686 // BSD-style license that can be found in the LICENSE file. | 683 // BSD-style license that can be found in the LICENSE file. |
| 687 | 684 |
| 688 | 685 |
| 689 @DocsEditable | 686 @DocsEditable |
| 690 @DomName('OfflineAudioContext') | 687 @DomName('OfflineAudioContext') |
| 691 class OfflineAudioContext extends AudioContext implements EventTarget native "*O
fflineAudioContext" { | 688 class OfflineAudioContext extends AudioContext implements EventTarget native "*O
fflineAudioContext" { |
| 692 | 689 |
| 693 @DocsEditable | 690 @DocsEditable |
| 694 factory OfflineAudioContext(int numberOfChannels, int numberOfFrames, num samp
leRate) => OfflineAudioContext._create(numberOfChannels, numberOfFrames, sampleR
ate); | 691 factory OfflineAudioContext(int numberOfChannels, int numberOfFrames, num samp
leRate) { |
| 695 static OfflineAudioContext _create(int numberOfChannels, int numberOfFrames, n
um sampleRate) => JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)', nu
mberOfChannels, numberOfFrames, sampleRate); | 692 return OfflineAudioContext._create_1(numberOfChannels, numberOfFrames, sampl
eRate); |
| 693 } |
| 694 static OfflineAudioContext _create_1(numberOfChannels, numberOfFrames, sampleR
ate) => JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)', numberOfChan
nels, numberOfFrames, sampleRate); |
| 696 } | 695 } |
| 697 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 696 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 698 // for details. All rights reserved. Use of this source code is governed by a | 697 // for details. All rights reserved. Use of this source code is governed by a |
| 699 // BSD-style license that can be found in the LICENSE file. | 698 // BSD-style license that can be found in the LICENSE file. |
| 700 | 699 |
| 701 | 700 |
| 702 @DocsEditable | 701 @DocsEditable |
| 703 @DomName('OscillatorNode') | 702 @DomName('OscillatorNode') |
| 704 class OscillatorNode extends AudioSourceNode native "*OscillatorNode" { | 703 class OscillatorNode extends AudioSourceNode native "*OscillatorNode" { |
| 705 | 704 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 } | 841 } |
| 843 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 842 // 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 | 843 // 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. | 844 // BSD-style license that can be found in the LICENSE file. |
| 846 | 845 |
| 847 | 846 |
| 848 @DocsEditable | 847 @DocsEditable |
| 849 @DomName('WaveTable') | 848 @DomName('WaveTable') |
| 850 class WaveTable native "*WaveTable" { | 849 class WaveTable native "*WaveTable" { |
| 851 } | 850 } |
| OLD | NEW |