| 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:html'; | 5 import 'dart:html'; |
| 6 import 'dart:html_common'; | 6 import 'dart:html_common'; |
| 7 import 'dart:nativewrappers'; | 7 import 'dart:nativewrappers'; |
| 8 import 'dart:typeddata' as _typeddata; | 8 import 'dart:typeddata' as _typeddata; |
| 9 // DO NOT EDIT | 9 // DO NOT EDIT |
| 10 // Auto-generated dart:audio library. | 10 // Auto-generated dart:audio library. |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 AudioContext.internal() : super.internal(); | 229 AudioContext.internal() : super.internal(); |
| 230 | 230 |
| 231 @DomName('AudioContext.completeEvent') | 231 @DomName('AudioContext.completeEvent') |
| 232 @DocsEditable | 232 @DocsEditable |
| 233 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi
der<Event>('complete'); | 233 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi
der<Event>('complete'); |
| 234 factory AudioContext() => _create(); | 234 factory AudioContext() => _create(); |
| 235 | 235 |
| 236 @DocsEditable | 236 @DocsEditable |
| 237 static AudioContext _create() native "AudioContext_constructorCallback"; | 237 static AudioContext _create() native "AudioContext_constructorCallback"; |
| 238 | 238 |
| 239 /// Checks if this type is supported on the current platform. |
| 240 static bool get supported => true; |
| 241 |
| 239 @DomName('AudioContext.activeSourceCount') | 242 @DomName('AudioContext.activeSourceCount') |
| 240 @DocsEditable | 243 @DocsEditable |
| 241 int get activeSourceCount native "AudioContext_activeSourceCount_Getter"; | 244 int get activeSourceCount native "AudioContext_activeSourceCount_Getter"; |
| 242 | 245 |
| 243 @DomName('AudioContext.currentTime') | 246 @DomName('AudioContext.currentTime') |
| 244 @DocsEditable | 247 @DocsEditable |
| 245 num get currentTime native "AudioContext_currentTime_Getter"; | 248 num get currentTime native "AudioContext_currentTime_Getter"; |
| 246 | 249 |
| 247 @DomName('AudioContext.destination') | 250 @DomName('AudioContext.destination') |
| 248 @DocsEditable | 251 @DocsEditable |
| (...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 | 1082 |
| 1080 @DomName('PannerNode.setPosition') | 1083 @DomName('PannerNode.setPosition') |
| 1081 @DocsEditable | 1084 @DocsEditable |
| 1082 void setPosition(num x, num y, num z) native "PannerNode_setPosition_Callback"
; | 1085 void setPosition(num x, num y, num z) native "PannerNode_setPosition_Callback"
; |
| 1083 | 1086 |
| 1084 @DomName('PannerNode.setVelocity') | 1087 @DomName('PannerNode.setVelocity') |
| 1085 @DocsEditable | 1088 @DocsEditable |
| 1086 void setVelocity(num x, num y, num z) native "PannerNode_setVelocity_Callback"
; | 1089 void setVelocity(num x, num y, num z) native "PannerNode_setVelocity_Callback"
; |
| 1087 | 1090 |
| 1088 } | 1091 } |
| 1089 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1092 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 1090 // for details. All rights reserved. Use of this source code is governed by a | 1093 // for details. All rights reserved. Use of this source code is governed by a |
| 1091 // BSD-style license that can be found in the LICENSE file. | 1094 // BSD-style license that can be found in the LICENSE file. |
| 1092 | 1095 |
| 1093 // WARNING: Do not edit - generated code. | |
| 1094 | 1096 |
| 1097 @DomName('ScriptProcessorNode') |
| 1098 class ScriptProcessorNode extends AudioNode { |
| 1099 Stream<AudioProcessingEvent> _eventStream; |
| 1095 | 1100 |
| 1096 @DocsEditable | 1101 /** |
| 1097 @DomName('ScriptProcessorNode') | 1102 * Get a Stream that fires events when AudioProcessingEvents occur. |
| 1098 class ScriptProcessorNode extends AudioNode implements EventTarget { | 1103 * This particular stream is special in that it only allows one listener to a |
| 1104 * given stream. Converting the returned Stream [asBroadcast] will likely ruin |
| 1105 * the soft-real-time properties which which these events are fired and can |
| 1106 * be processed. |
| 1107 */ |
| 1108 Stream<AudioProcessingEvent> get onAudioProcess { |
| 1109 if (_eventStream == null) { |
| 1110 var controller = new StreamController(); |
| 1111 var callback = (audioData) { |
| 1112 if (controller.hasSubscribers) { |
| 1113 // This stream is a strange combination of broadcast and single |
| 1114 // subscriber streams. We only allow one listener, but if there is |
| 1115 // no listener, we don't queue up events, we just drop them on the |
| 1116 // floor. |
| 1117 controller.add(audioData); |
| 1118 } |
| 1119 }; |
| 1120 // TODO(podivilov): Implement on Dartium. |
| 1121 |
| 1122 _eventStream = controller.stream; |
| 1123 } |
| 1124 return _eventStream; |
| 1125 } |
| 1099 ScriptProcessorNode.internal() : super.internal(); | 1126 ScriptProcessorNode.internal() : super.internal(); |
| 1100 | 1127 |
| 1101 @DomName('ScriptProcessorNode.bufferSize') | 1128 @DomName('ScriptProcessorNode.bufferSize') |
| 1102 @DocsEditable | 1129 @DocsEditable |
| 1103 int get bufferSize native "ScriptProcessorNode_bufferSize_Getter"; | 1130 int get bufferSize native "ScriptProcessorNode_bufferSize_Getter"; |
| 1104 | 1131 |
| 1105 } | 1132 } |
| 1106 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1133 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1107 // for details. All rights reserved. Use of this source code is governed by a | 1134 // for details. All rights reserved. Use of this source code is governed by a |
| 1108 // BSD-style license that can be found in the LICENSE file. | 1135 // BSD-style license that can be found in the LICENSE file. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1130 | 1157 |
| 1131 // WARNING: Do not edit - generated code. | 1158 // WARNING: Do not edit - generated code. |
| 1132 | 1159 |
| 1133 | 1160 |
| 1134 @DocsEditable | 1161 @DocsEditable |
| 1135 @DomName('WaveTable') | 1162 @DomName('WaveTable') |
| 1136 class WaveTable extends NativeFieldWrapperClass1 { | 1163 class WaveTable extends NativeFieldWrapperClass1 { |
| 1137 WaveTable.internal(); | 1164 WaveTable.internal(); |
| 1138 | 1165 |
| 1139 } | 1166 } |
| OLD | NEW |