OLD | NEW |
1 /** | 1 /** |
2 * High-fidelity audio programming in the browser. | 2 * High-fidelity audio programming in the browser. |
3 */ | 3 */ |
4 library dart.dom.web_audio; | 4 library dart.dom.web_audio; |
5 | 5 |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'dart:_internal' hide deprecated; | 8 import 'dart:_internal' hide deprecated; |
9 import 'dart:html'; | 9 import 'dart:html'; |
10 import 'dart:html_common'; | 10 import 'dart:html_common'; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 @DomName('AudioBufferCallback') | 108 @DomName('AudioBufferCallback') |
109 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu
ffer-section | 109 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu
ffer-section |
110 @Experimental() | 110 @Experimental() |
111 typedef void AudioBufferCallback(AudioBuffer audioBuffer); | 111 typedef void AudioBufferCallback(AudioBuffer audioBuffer); |
112 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 112 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
113 // for details. All rights reserved. Use of this source code is governed by a | 113 // for details. All rights reserved. Use of this source code is governed by a |
114 // BSD-style license that can be found in the LICENSE file. | 114 // BSD-style license that can be found in the LICENSE file. |
115 | 115 |
116 | 116 |
117 @DomName('AudioBufferSourceNode') | 117 @DomName('AudioBufferSourceNode') |
| 118 @SupportedBrowser(SupportedBrowser.CHROME) |
| 119 @SupportedBrowser(SupportedBrowser.FIREFOX) |
| 120 @Experimental() |
118 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu
fferSourceNode-section | 121 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu
fferSourceNode-section |
119 @Experimental() | |
120 class AudioBufferSourceNode extends AudioSourceNode native "AudioBufferSourceNod
e" { | 122 class AudioBufferSourceNode extends AudioSourceNode native "AudioBufferSourceNod
e" { |
121 | 123 |
122 // TODO(efortuna): Remove these methods when Chrome stable also uses start | 124 // TODO(efortuna): Remove these methods when Chrome stable also uses start |
123 // instead of noteOn. | 125 // instead of noteOn. |
124 void start(num when, [num grainOffset, num grainDuration]) { | 126 void start(num when, [num grainOffset, num grainDuration]) { |
125 if (JS('bool', '!!#.start', this)) { | 127 if (JS('bool', '!!#.start', this)) { |
126 if (grainDuration != null) { | 128 if (grainDuration != null) { |
127 JS('void', '#.start(#, #, #)', this, when, grainOffset, grainDuration); | 129 JS('void', '#.start(#, #, #)', this, when, grainOffset, grainDuration); |
128 } else if (grainOffset != null) { | 130 } else if (grainOffset != null) { |
129 JS('void', '#.start(#, #)', this, when, grainOffset); | 131 JS('void', '#.start(#, #)', this, when, grainOffset); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 @Experimental() // untriaged | 218 @Experimental() // untriaged |
217 Stream<Event> get onEnded => endedEvent.forTarget(this); | 219 Stream<Event> get onEnded => endedEvent.forTarget(this); |
218 | 220 |
219 } | 221 } |
220 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 222 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
221 // for details. All rights reserved. Use of this source code is governed by a | 223 // for details. All rights reserved. Use of this source code is governed by a |
222 // BSD-style license that can be found in the LICENSE file. | 224 // BSD-style license that can be found in the LICENSE file. |
223 | 225 |
224 | 226 |
225 @DomName('AudioContext') | 227 @DomName('AudioContext') |
| 228 @SupportedBrowser(SupportedBrowser.CHROME) |
| 229 @SupportedBrowser(SupportedBrowser.FIREFOX) |
| 230 @Experimental() |
226 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioCo
ntext-section | 231 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioCo
ntext-section |
227 @Experimental() | |
228 class AudioContext extends EventTarget native "AudioContext,webkitAudioContext"
{ | 232 class AudioContext extends EventTarget native "AudioContext,webkitAudioContext"
{ |
229 // To suppress missing implicit constructor warnings. | 233 // To suppress missing implicit constructor warnings. |
230 factory AudioContext._() { throw new UnsupportedError("Not supported"); } | 234 factory AudioContext._() { throw new UnsupportedError("Not supported"); } |
231 | 235 |
232 /** | 236 /** |
233 * Static factory designed to expose `complete` events to event | 237 * Static factory designed to expose `complete` events to event |
234 * handlers that are not necessarily instances of [AudioContext]. | 238 * handlers that are not necessarily instances of [AudioContext]. |
235 * | 239 * |
236 * See [EventStreamProvider] for usage information. | 240 * See [EventStreamProvider] for usage information. |
237 */ | 241 */ |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 factory WaveShaperNode._() { throw new UnsupportedError("Not supported"); } | 1059 factory WaveShaperNode._() { throw new UnsupportedError("Not supported"); } |
1056 | 1060 |
1057 @DomName('WaveShaperNode.curve') | 1061 @DomName('WaveShaperNode.curve') |
1058 @DocsEditable() | 1062 @DocsEditable() |
1059 Float32List curve; | 1063 Float32List curve; |
1060 | 1064 |
1061 @DomName('WaveShaperNode.oversample') | 1065 @DomName('WaveShaperNode.oversample') |
1062 @DocsEditable() | 1066 @DocsEditable() |
1063 String oversample; | 1067 String oversample; |
1064 } | 1068 } |
OLD | NEW |