| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 @DocsEditable() | 58 @DocsEditable() |
| 59 void getByteFrequencyData(Uint8List array) native; | 59 void getByteFrequencyData(Uint8List array) native; |
| 60 | 60 |
| 61 @DomName('AnalyserNode.getByteTimeDomainData') | 61 @DomName('AnalyserNode.getByteTimeDomainData') |
| 62 @DocsEditable() | 62 @DocsEditable() |
| 63 void getByteTimeDomainData(Uint8List array) native; | 63 void getByteTimeDomainData(Uint8List array) native; |
| 64 | 64 |
| 65 @DomName('AnalyserNode.getFloatFrequencyData') | 65 @DomName('AnalyserNode.getFloatFrequencyData') |
| 66 @DocsEditable() | 66 @DocsEditable() |
| 67 void getFloatFrequencyData(Float32List array) native; | 67 void getFloatFrequencyData(Float32List array) native; |
| 68 |
| 69 @DomName('AnalyserNode.getFloatTimeDomainData') |
| 70 @DocsEditable() |
| 71 @Experimental() // untriaged |
| 72 void getFloatTimeDomainData(Float32List array) native; |
| 68 } | 73 } |
| 69 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 74 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 70 // for details. All rights reserved. Use of this source code is governed by a | 75 // for details. All rights reserved. Use of this source code is governed by a |
| 71 // BSD-style license that can be found in the LICENSE file. | 76 // BSD-style license that can be found in the LICENSE file. |
| 72 | 77 |
| 73 | 78 |
| 74 @DocsEditable() | 79 @DocsEditable() |
| 75 @DomName('AudioBuffer') | 80 @DomName('AudioBuffer') |
| 76 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu
ffer-section | 81 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBu
ffer-section |
| 77 @Experimental() | 82 @Experimental() |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 * Static factory designed to expose `ended` events to event | 165 * Static factory designed to expose `ended` events to event |
| 161 * handlers that are not necessarily instances of [AudioBufferSourceNode]. | 166 * handlers that are not necessarily instances of [AudioBufferSourceNode]. |
| 162 * | 167 * |
| 163 * See [EventStreamProvider] for usage information. | 168 * See [EventStreamProvider] for usage information. |
| 164 */ | 169 */ |
| 165 @DomName('AudioBufferSourceNode.endedEvent') | 170 @DomName('AudioBufferSourceNode.endedEvent') |
| 166 @DocsEditable() | 171 @DocsEditable() |
| 167 @Experimental() // untriaged | 172 @Experimental() // untriaged |
| 168 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider
<Event>('ended'); | 173 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider
<Event>('ended'); |
| 169 | 174 |
| 170 @DomName('AudioBufferSourceNode.FINISHED_STATE') | |
| 171 @DocsEditable() | |
| 172 static const int FINISHED_STATE = 3; | |
| 173 | |
| 174 @DomName('AudioBufferSourceNode.PLAYING_STATE') | |
| 175 @DocsEditable() | |
| 176 static const int PLAYING_STATE = 2; | |
| 177 | |
| 178 @DomName('AudioBufferSourceNode.SCHEDULED_STATE') | |
| 179 @DocsEditable() | |
| 180 static const int SCHEDULED_STATE = 1; | |
| 181 | |
| 182 @DomName('AudioBufferSourceNode.UNSCHEDULED_STATE') | |
| 183 @DocsEditable() | |
| 184 static const int UNSCHEDULED_STATE = 0; | |
| 185 | |
| 186 @DomName('AudioBufferSourceNode.buffer') | 175 @DomName('AudioBufferSourceNode.buffer') |
| 187 @DocsEditable() | 176 @DocsEditable() |
| 188 AudioBuffer buffer; | 177 AudioBuffer buffer; |
| 189 | 178 |
| 190 @DomName('AudioBufferSourceNode.loop') | 179 @DomName('AudioBufferSourceNode.loop') |
| 191 @DocsEditable() | 180 @DocsEditable() |
| 192 bool loop; | 181 bool loop; |
| 193 | 182 |
| 194 @DomName('AudioBufferSourceNode.loopEnd') | 183 @DomName('AudioBufferSourceNode.loopEnd') |
| 195 @DocsEditable() | 184 @DocsEditable() |
| 196 num loopEnd; | 185 num loopEnd; |
| 197 | 186 |
| 198 @DomName('AudioBufferSourceNode.loopStart') | 187 @DomName('AudioBufferSourceNode.loopStart') |
| 199 @DocsEditable() | 188 @DocsEditable() |
| 200 num loopStart; | 189 num loopStart; |
| 201 | 190 |
| 202 @DomName('AudioBufferSourceNode.playbackRate') | 191 @DomName('AudioBufferSourceNode.playbackRate') |
| 203 @DocsEditable() | 192 @DocsEditable() |
| 204 final AudioParam playbackRate; | 193 final AudioParam playbackRate; |
| 205 | 194 |
| 206 @DomName('AudioBufferSourceNode.noteGrainOn') | |
| 207 @DocsEditable() | |
| 208 void noteGrainOn(num when, num grainOffset, num grainDuration) native; | |
| 209 | |
| 210 @DomName('AudioBufferSourceNode.noteOff') | |
| 211 @DocsEditable() | |
| 212 void noteOff(num when) native; | |
| 213 | |
| 214 @DomName('AudioBufferSourceNode.noteOn') | |
| 215 @DocsEditable() | |
| 216 void noteOn(num when) native; | |
| 217 | |
| 218 /// Stream of `ended` events handled by this [AudioBufferSourceNode]. | 195 /// Stream of `ended` events handled by this [AudioBufferSourceNode]. |
| 219 @DomName('AudioBufferSourceNode.onended') | 196 @DomName('AudioBufferSourceNode.onended') |
| 220 @DocsEditable() | 197 @DocsEditable() |
| 221 @Experimental() // untriaged | 198 @Experimental() // untriaged |
| 222 Stream<Event> get onEnded => endedEvent.forTarget(this); | 199 Stream<Event> get onEnded => endedEvent.forTarget(this); |
| 223 | 200 |
| 224 } | 201 } |
| 225 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 202 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 226 // for details. All rights reserved. Use of this source code is governed by a | 203 // for details. All rights reserved. Use of this source code is governed by a |
| 227 // BSD-style license that can be found in the LICENSE file. | 204 // BSD-style license that can be found in the LICENSE file. |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 // To suppress missing implicit constructor warnings. | 545 // To suppress missing implicit constructor warnings. |
| 569 factory AudioProcessingEvent._() { throw new UnsupportedError("Not supported")
; } | 546 factory AudioProcessingEvent._() { throw new UnsupportedError("Not supported")
; } |
| 570 | 547 |
| 571 @DomName('AudioProcessingEvent.inputBuffer') | 548 @DomName('AudioProcessingEvent.inputBuffer') |
| 572 @DocsEditable() | 549 @DocsEditable() |
| 573 final AudioBuffer inputBuffer; | 550 final AudioBuffer inputBuffer; |
| 574 | 551 |
| 575 @DomName('AudioProcessingEvent.outputBuffer') | 552 @DomName('AudioProcessingEvent.outputBuffer') |
| 576 @DocsEditable() | 553 @DocsEditable() |
| 577 final AudioBuffer outputBuffer; | 554 final AudioBuffer outputBuffer; |
| 555 |
| 556 @DomName('AudioProcessingEvent.playbackTime') |
| 557 @DocsEditable() |
| 558 @Experimental() // untriaged |
| 559 final double playbackTime; |
| 578 } | 560 } |
| 579 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 561 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 580 // for details. All rights reserved. Use of this source code is governed by a | 562 // for details. All rights reserved. Use of this source code is governed by a |
| 581 // BSD-style license that can be found in the LICENSE file. | 563 // BSD-style license that can be found in the LICENSE file. |
| 582 | 564 |
| 583 | 565 |
| 584 @DocsEditable() | 566 @DocsEditable() |
| 585 @DomName('AudioSourceNode') | 567 @DomName('AudioSourceNode') |
| 586 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html | 568 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html |
| 587 @Experimental() | 569 @Experimental() |
| 588 @Native("AudioSourceNode") | 570 @Native("AudioSourceNode") |
| 589 class AudioSourceNode extends AudioNode { | 571 class AudioSourceNode extends AudioNode { |
| 590 // To suppress missing implicit constructor warnings. | 572 // To suppress missing implicit constructor warnings. |
| 591 factory AudioSourceNode._() { throw new UnsupportedError("Not supported"); } | 573 factory AudioSourceNode._() { throw new UnsupportedError("Not supported"); } |
| 592 } | 574 } |
| 593 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 575 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 594 // for details. All rights reserved. Use of this source code is governed by a | 576 // for details. All rights reserved. Use of this source code is governed by a |
| 595 // BSD-style license that can be found in the LICENSE file. | 577 // BSD-style license that can be found in the LICENSE file. |
| 596 | 578 |
| 597 | 579 |
| 598 @DocsEditable() | 580 @DocsEditable() |
| 599 @DomName('BiquadFilterNode') | 581 @DomName('BiquadFilterNode') |
| 600 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#BiquadF
ilterNode-section | 582 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#BiquadF
ilterNode-section |
| 601 @Experimental() | 583 @Experimental() |
| 602 @Native("BiquadFilterNode") | 584 @Native("BiquadFilterNode") |
| 603 class BiquadFilterNode extends AudioNode { | 585 class BiquadFilterNode extends AudioNode { |
| 604 // To suppress missing implicit constructor warnings. | 586 // To suppress missing implicit constructor warnings. |
| 605 factory BiquadFilterNode._() { throw new UnsupportedError("Not supported"); } | 587 factory BiquadFilterNode._() { throw new UnsupportedError("Not supported"); } |
| 606 | 588 |
| 607 @DomName('BiquadFilterNode.ALLPASS') | |
| 608 @DocsEditable() | |
| 609 static const int ALLPASS = 7; | |
| 610 | |
| 611 @DomName('BiquadFilterNode.BANDPASS') | |
| 612 @DocsEditable() | |
| 613 static const int BANDPASS = 2; | |
| 614 | |
| 615 @DomName('BiquadFilterNode.HIGHPASS') | |
| 616 @DocsEditable() | |
| 617 static const int HIGHPASS = 1; | |
| 618 | |
| 619 @DomName('BiquadFilterNode.HIGHSHELF') | |
| 620 @DocsEditable() | |
| 621 static const int HIGHSHELF = 4; | |
| 622 | |
| 623 @DomName('BiquadFilterNode.LOWPASS') | |
| 624 @DocsEditable() | |
| 625 static const int LOWPASS = 0; | |
| 626 | |
| 627 @DomName('BiquadFilterNode.LOWSHELF') | |
| 628 @DocsEditable() | |
| 629 static const int LOWSHELF = 3; | |
| 630 | |
| 631 @DomName('BiquadFilterNode.NOTCH') | |
| 632 @DocsEditable() | |
| 633 static const int NOTCH = 6; | |
| 634 | |
| 635 @DomName('BiquadFilterNode.PEAKING') | |
| 636 @DocsEditable() | |
| 637 static const int PEAKING = 5; | |
| 638 | |
| 639 @DomName('BiquadFilterNode.Q') | 589 @DomName('BiquadFilterNode.Q') |
| 640 @DocsEditable() | 590 @DocsEditable() |
| 641 final AudioParam Q; | 591 final AudioParam Q; |
| 642 | 592 |
| 643 @DomName('BiquadFilterNode.detune') | 593 @DomName('BiquadFilterNode.detune') |
| 644 @DocsEditable() | 594 @DocsEditable() |
| 645 final AudioParam detune; | 595 final AudioParam detune; |
| 646 | 596 |
| 647 @DomName('BiquadFilterNode.frequency') | 597 @DomName('BiquadFilterNode.frequency') |
| 648 @DocsEditable() | 598 @DocsEditable() |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 * Static factory designed to expose `ended` events to event | 846 * Static factory designed to expose `ended` events to event |
| 897 * handlers that are not necessarily instances of [OscillatorNode]. | 847 * handlers that are not necessarily instances of [OscillatorNode]. |
| 898 * | 848 * |
| 899 * See [EventStreamProvider] for usage information. | 849 * See [EventStreamProvider] for usage information. |
| 900 */ | 850 */ |
| 901 @DomName('OscillatorNode.endedEvent') | 851 @DomName('OscillatorNode.endedEvent') |
| 902 @DocsEditable() | 852 @DocsEditable() |
| 903 @Experimental() // untriaged | 853 @Experimental() // untriaged |
| 904 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider
<Event>('ended'); | 854 static const EventStreamProvider<Event> endedEvent = const EventStreamProvider
<Event>('ended'); |
| 905 | 855 |
| 906 @DomName('OscillatorNode.FINISHED_STATE') | |
| 907 @DocsEditable() | |
| 908 static const int FINISHED_STATE = 3; | |
| 909 | |
| 910 @DomName('OscillatorNode.PLAYING_STATE') | |
| 911 @DocsEditable() | |
| 912 static const int PLAYING_STATE = 2; | |
| 913 | |
| 914 @DomName('OscillatorNode.SCHEDULED_STATE') | |
| 915 @DocsEditable() | |
| 916 static const int SCHEDULED_STATE = 1; | |
| 917 | |
| 918 @DomName('OscillatorNode.UNSCHEDULED_STATE') | |
| 919 @DocsEditable() | |
| 920 static const int UNSCHEDULED_STATE = 0; | |
| 921 | |
| 922 @DomName('OscillatorNode.detune') | 856 @DomName('OscillatorNode.detune') |
| 923 @DocsEditable() | 857 @DocsEditable() |
| 924 final AudioParam detune; | 858 final AudioParam detune; |
| 925 | 859 |
| 926 @DomName('OscillatorNode.frequency') | 860 @DomName('OscillatorNode.frequency') |
| 927 @DocsEditable() | 861 @DocsEditable() |
| 928 final AudioParam frequency; | 862 final AudioParam frequency; |
| 929 | 863 |
| 930 @DomName('OscillatorNode.type') | 864 @DomName('OscillatorNode.type') |
| 931 @DocsEditable() | 865 @DocsEditable() |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 | 970 |
| 1037 @DocsEditable() | 971 @DocsEditable() |
| 1038 @DomName('ScriptProcessorNode') | 972 @DomName('ScriptProcessorNode') |
| 1039 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ScriptP
rocessorNode | 973 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ScriptP
rocessorNode |
| 1040 @Experimental() | 974 @Experimental() |
| 1041 @Native("ScriptProcessorNode,JavaScriptAudioNode") | 975 @Native("ScriptProcessorNode,JavaScriptAudioNode") |
| 1042 class ScriptProcessorNode extends AudioNode { | 976 class ScriptProcessorNode extends AudioNode { |
| 1043 // To suppress missing implicit constructor warnings. | 977 // To suppress missing implicit constructor warnings. |
| 1044 factory ScriptProcessorNode._() { throw new UnsupportedError("Not supported");
} | 978 factory ScriptProcessorNode._() { throw new UnsupportedError("Not supported");
} |
| 1045 | 979 |
| 1046 /** | |
| 1047 * Static factory designed to expose `audioprocess` events to event | |
| 1048 * handlers that are not necessarily instances of [ScriptProcessorNode]. | |
| 1049 * | |
| 1050 * See [EventStreamProvider] for usage information. | |
| 1051 */ | |
| 1052 @DomName('ScriptProcessorNode.audioprocessEvent') | |
| 1053 @DocsEditable() | |
| 1054 @Experimental() // untriaged | |
| 1055 static const EventStreamProvider<AudioProcessingEvent> audioProcessEvent = con
st EventStreamProvider<AudioProcessingEvent>('audioprocess'); | |
| 1056 | |
| 1057 @DomName('ScriptProcessorNode.bufferSize') | 980 @DomName('ScriptProcessorNode.bufferSize') |
| 1058 @DocsEditable() | 981 @DocsEditable() |
| 1059 final int bufferSize; | 982 final int bufferSize; |
| 1060 | 983 |
| 1061 /// Stream of `audioprocess` events handled by this [ScriptProcessorNode]. | 984 @DomName('ScriptProcessorNode.setEventListener') |
| 1062 /** | |
| 1063 * Get a Stream that fires events when AudioProcessingEvents occur. | |
| 1064 * This particular stream is special in that it only allows one listener to a | |
| 1065 * given stream. Converting the returned Stream [asBroadcast] will likely ruin | |
| 1066 * the soft-real-time properties which which these events are fired and can | |
| 1067 * be processed. | |
| 1068 */ | |
| 1069 @DomName('ScriptProcessorNode.onaudioprocess') | |
| 1070 @DocsEditable() | 985 @DocsEditable() |
| 1071 @Experimental() // untriaged | 986 @Experimental() // untriaged |
| 1072 Stream<AudioProcessingEvent> get onAudioProcess => audioProcessEvent.forTarget
(this); | 987 void setEventListener(EventListener eventListener) native; |
| 1073 } | 988 } |
| 1074 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 989 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1075 // for details. All rights reserved. Use of this source code is governed by a | 990 // for details. All rights reserved. Use of this source code is governed by a |
| 1076 // BSD-style license that can be found in the LICENSE file. | 991 // BSD-style license that can be found in the LICENSE file. |
| 1077 | 992 |
| 1078 | 993 |
| 1079 @DocsEditable() | 994 @DocsEditable() |
| 1080 @DomName('WaveShaperNode') | 995 @DomName('WaveShaperNode') |
| 1081 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Wav
eShaperNode | 996 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-Wav
eShaperNode |
| 1082 @Experimental() | 997 @Experimental() |
| 1083 @Native("WaveShaperNode") | 998 @Native("WaveShaperNode") |
| 1084 class WaveShaperNode extends AudioNode { | 999 class WaveShaperNode extends AudioNode { |
| 1085 // To suppress missing implicit constructor warnings. | 1000 // To suppress missing implicit constructor warnings. |
| 1086 factory WaveShaperNode._() { throw new UnsupportedError("Not supported"); } | 1001 factory WaveShaperNode._() { throw new UnsupportedError("Not supported"); } |
| 1087 | 1002 |
| 1088 @DomName('WaveShaperNode.curve') | 1003 @DomName('WaveShaperNode.curve') |
| 1089 @DocsEditable() | 1004 @DocsEditable() |
| 1090 Float32List curve; | 1005 Float32List curve; |
| 1091 | 1006 |
| 1092 @DomName('WaveShaperNode.oversample') | 1007 @DomName('WaveShaperNode.oversample') |
| 1093 @DocsEditable() | 1008 @DocsEditable() |
| 1094 String oversample; | 1009 String oversample; |
| 1095 } | 1010 } |
| OLD | NEW |