| OLD | NEW |
| 1 library web_audio; | 1 library web_audio; |
| 2 | 2 |
| 3 import 'dart:async'; |
| 3 import 'dart:html'; | 4 import 'dart:html'; |
| 4 // DO NOT EDIT | 5 // DO NOT EDIT |
| 5 // Auto-generated dart:audio library. | 6 // Auto-generated dart:audio library. |
| 6 | 7 |
| 7 | 8 |
| 8 | 9 |
| 9 | 10 |
| 10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 11 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 11 // for details. All rights reserved. Use of this source code is governed by a | 12 // for details. All rights reserved. Use of this source code is governed by a |
| 12 // BSD-style license that can be found in the LICENSE file. | 13 // BSD-style license that can be found in the LICENSE file. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 143 |
| 143 } | 144 } |
| 144 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 145 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 145 // for details. All rights reserved. Use of this source code is governed by a | 146 // for details. All rights reserved. Use of this source code is governed by a |
| 146 // BSD-style license that can be found in the LICENSE file. | 147 // BSD-style license that can be found in the LICENSE file. |
| 147 | 148 |
| 148 | 149 |
| 149 /// @domName AudioContext | 150 /// @domName AudioContext |
| 150 class AudioContext extends EventTarget native "*AudioContext" { | 151 class AudioContext extends EventTarget native "*AudioContext" { |
| 151 | 152 |
| 153 static const HtmlStreamProvider<Event> completeEvent = const HtmlStreamProvide
r<Event>('complete'); |
| 154 |
| 152 ///@docsEditable true | 155 ///@docsEditable true |
| 153 factory AudioContext() => AudioContext._create(); | 156 factory AudioContext() => AudioContext._create(); |
| 154 | 157 |
| 155 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true | 158 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true |
| 156 AudioContextEvents get on => | 159 AudioContextEvents get on => |
| 157 new AudioContextEvents(this); | 160 new AudioContextEvents(this); |
| 158 | 161 |
| 159 /// @domName AudioContext.activeSourceCount; @docsEditable true | 162 /// @domName AudioContext.activeSourceCount; @docsEditable true |
| 160 final int activeSourceCount; | 163 final int activeSourceCount; |
| 161 | 164 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 221 |
| 219 /// @domName AudioContext.createWaveTable; @docsEditable true | 222 /// @domName AudioContext.createWaveTable; @docsEditable true |
| 220 WaveTable createWaveTable(Float32Array real, Float32Array imag) native; | 223 WaveTable createWaveTable(Float32Array real, Float32Array imag) native; |
| 221 | 224 |
| 222 /// @domName AudioContext.decodeAudioData; @docsEditable true | 225 /// @domName AudioContext.decodeAudioData; @docsEditable true |
| 223 void decodeAudioData(ArrayBuffer audioData, AudioBufferCallback successCallbac
k, [AudioBufferCallback errorCallback]) native; | 226 void decodeAudioData(ArrayBuffer audioData, AudioBufferCallback successCallbac
k, [AudioBufferCallback errorCallback]) native; |
| 224 | 227 |
| 225 /// @domName AudioContext.startRendering; @docsEditable true | 228 /// @domName AudioContext.startRendering; @docsEditable true |
| 226 void startRendering() native; | 229 void startRendering() native; |
| 227 | 230 |
| 231 Stream<Event> get onComplete => completeEvent.forTarget(this); |
| 232 |
| 228 static AudioContext _create() => JS('AudioContext', | 233 static AudioContext _create() => JS('AudioContext', |
| 229 'new (window.AudioContext || window.webkitAudioContext)()'); | 234 'new (window.AudioContext || window.webkitAudioContext)()'); |
| 230 | 235 |
| 231 GainNode createGain() { | 236 GainNode createGain() { |
| 232 if (JS('bool', '#.createGain !== undefined', this)) { | 237 if (JS('bool', '#.createGain !== undefined', this)) { |
| 233 return JS('GainNode', '#.createGain()', this); | 238 return JS('GainNode', '#.createGain()', this); |
| 234 } else { | 239 } else { |
| 235 return JS('GainNode', '#.createGainNode()', this); | 240 return JS('GainNode', '#.createGainNode()', this); |
| 236 } | 241 } |
| 237 } | 242 } |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 Float32Array curve; | 696 Float32Array curve; |
| 692 } | 697 } |
| 693 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 698 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 694 // for details. All rights reserved. Use of this source code is governed by a | 699 // for details. All rights reserved. Use of this source code is governed by a |
| 695 // BSD-style license that can be found in the LICENSE file. | 700 // BSD-style license that can be found in the LICENSE file. |
| 696 | 701 |
| 697 | 702 |
| 698 /// @domName WaveTable; @docsEditable true | 703 /// @domName WaveTable; @docsEditable true |
| 699 class WaveTable native "*WaveTable" { | 704 class WaveTable native "*WaveTable" { |
| 700 } | 705 } |
| OLD | NEW |