@rescript/webapi 0.1.0-experimental-29b94b3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +14 -0
- package/package.json +38 -0
- package/rescript.json +19 -0
- package/src/CSSFontLoadingAPI/FontFace.res +34 -0
- package/src/CSSFontLoadingAPI/FontFaceSet.res +112 -0
- package/src/CSSFontLoadingAPI.res +101 -0
- package/src/CanvasAPI/ImageBitmap.res +8 -0
- package/src/CanvasAPI/OffscreenCanvas.res +123 -0
- package/src/CanvasAPI.res +55 -0
- package/src/ChannelMessagingAPI/MessagePort.res +120 -0
- package/src/ChannelMessagingAPI.res +13 -0
- package/src/ClipboardAPI/Clipboard.res +106 -0
- package/src/ClipboardAPI/ClipboardItem.res +21 -0
- package/src/ClipboardAPI.res +31 -0
- package/src/CredentialManagementAPI/CredentialsContainer.res +31 -0
- package/src/CredentialManagementAPI.res +140 -0
- package/src/DOMAPI/Animation.res +137 -0
- package/src/DOMAPI/AnimationEffect.res +19 -0
- package/src/DOMAPI/CSSRuleList.res +7 -0
- package/src/DOMAPI/CSSStyleDeclaration.res +36 -0
- package/src/DOMAPI/CSSStyleSheet.res +32 -0
- package/src/DOMAPI/CSSStyleValue.res +13 -0
- package/src/DOMAPI/CaretPosition.res +4 -0
- package/src/DOMAPI/CharacterData.res +272 -0
- package/src/DOMAPI/Comment.res +278 -0
- package/src/DOMAPI/CustomElementRegistry.res +31 -0
- package/src/DOMAPI/DOMImplementation.res +30 -0
- package/src/DOMAPI/DOMMatrix.res +169 -0
- package/src/DOMAPI/DOMMatrixReadOnly.res +103 -0
- package/src/DOMAPI/DOMPoint.res +29 -0
- package/src/DOMAPI/DOMPointReadOnly.res +24 -0
- package/src/DOMAPI/DOMRect.res +23 -0
- package/src/DOMAPI/DOMRectList.res +4 -0
- package/src/DOMAPI/DOMRectReadOnly.res +17 -0
- package/src/DOMAPI/DOMTokenList.res +72 -0
- package/src/DOMAPI/Document.res +634 -0
- package/src/DOMAPI/DocumentFragment.res +261 -0
- package/src/DOMAPI/DocumentTimeline.res +9 -0
- package/src/DOMAPI/Element.res +634 -0
- package/src/DOMAPI/ElementInternals.res +39 -0
- package/src/DOMAPI/FileList.res +8 -0
- package/src/DOMAPI/HTMLAnchorElement.res +693 -0
- package/src/DOMAPI/HTMLAreaElement.res +687 -0
- package/src/DOMAPI/HTMLAudioElement.res +750 -0
- package/src/DOMAPI/HTMLBRElement.res +686 -0
- package/src/DOMAPI/HTMLBaseElement.res +687 -0
- package/src/DOMAPI/HTMLBodyElement.res +687 -0
- package/src/DOMAPI/HTMLButtonElement.res +714 -0
- package/src/DOMAPI/HTMLCanvasElement.res +741 -0
- package/src/DOMAPI/HTMLCollection.res +15 -0
- package/src/DOMAPI/HTMLCollectionOf.res +16 -0
- package/src/DOMAPI/HTMLDListElement.res +690 -0
- package/src/DOMAPI/HTMLDataElement.res +687 -0
- package/src/DOMAPI/HTMLDataListElement.res +697 -0
- package/src/DOMAPI/HTMLDialogElement.res +715 -0
- package/src/DOMAPI/HTMLDivElement.res +686 -0
- package/src/DOMAPI/HTMLElement.res +685 -0
- package/src/DOMAPI/HTMLEmbedElement.res +693 -0
- package/src/DOMAPI/HTMLFieldSetElement.res +718 -0
- package/src/DOMAPI/HTMLFormControlsCollection.res +16 -0
- package/src/DOMAPI/HTMLFormElement.res +720 -0
- package/src/DOMAPI/HTMLFrameSetElement.res +697 -0
- package/src/DOMAPI/HTMLHRElement.res +686 -0
- package/src/DOMAPI/HTMLHeadElement.res +687 -0
- package/src/DOMAPI/HTMLHeadingElement.res +693 -0
- package/src/DOMAPI/HTMLHtmlElement.res +687 -0
- package/src/DOMAPI/HTMLIFrameElement.res +696 -0
- package/src/DOMAPI/HTMLImageElement.res +696 -0
- package/src/DOMAPI/HTMLInputElement.res +773 -0
- package/src/DOMAPI/HTMLLIElement.res +686 -0
- package/src/DOMAPI/HTMLLabelElement.res +690 -0
- package/src/DOMAPI/HTMLLegendElement.res +693 -0
- package/src/DOMAPI/HTMLLinkElement.res +687 -0
- package/src/DOMAPI/HTMLMapElement.res +686 -0
- package/src/DOMAPI/HTMLMediaElement.res +749 -0
- package/src/DOMAPI/HTMLMenuElement.res +687 -0
- package/src/DOMAPI/HTMLMetaElement.res +687 -0
- package/src/DOMAPI/HTMLMeterElement.res +690 -0
- package/src/DOMAPI/HTMLModElement.res +686 -0
- package/src/DOMAPI/HTMLOListElement.res +690 -0
- package/src/DOMAPI/HTMLObjectElement.res +717 -0
- package/src/DOMAPI/HTMLOptGroupElement.res +697 -0
- package/src/DOMAPI/HTMLOptionElement.res +693 -0
- package/src/DOMAPI/HTMLOptionsCollection.res +21 -0
- package/src/DOMAPI/HTMLOutputElement.res +711 -0
- package/src/DOMAPI/HTMLParagraphElement.res +701 -0
- package/src/DOMAPI/HTMLPictureElement.res +693 -0
- package/src/DOMAPI/HTMLPreElement.res +686 -0
- package/src/DOMAPI/HTMLProgressElement.res +697 -0
- package/src/DOMAPI/HTMLQuoteElement.res +690 -0
- package/src/DOMAPI/HTMLScriptElement.res +699 -0
- package/src/DOMAPI/HTMLSelectElement.res +762 -0
- package/src/DOMAPI/HTMLSlotElement.res +713 -0
- package/src/DOMAPI/HTMLSourceElement.res +693 -0
- package/src/DOMAPI/HTMLSpanElement.res +687 -0
- package/src/DOMAPI/HTMLStyleElement.res +690 -0
- package/src/DOMAPI/HTMLTableCaptionElement.res +714 -0
- package/src/DOMAPI/HTMLTableCellElement.res +701 -0
- package/src/DOMAPI/HTMLTableElement.res +755 -0
- package/src/DOMAPI/HTMLTableRowElement.res +713 -0
- package/src/DOMAPI/HTMLTableSectionElement.res +730 -0
- package/src/DOMAPI/HTMLTemplateElement.res +697 -0
- package/src/DOMAPI/HTMLTextAreaElement.res +758 -0
- package/src/DOMAPI/HTMLTimeElement.res +687 -0
- package/src/DOMAPI/HTMLTitleElement.res +690 -0
- package/src/DOMAPI/HTMLTrackElement.res +690 -0
- package/src/DOMAPI/HTMLUListElement.res +690 -0
- package/src/DOMAPI/HTMLVideoElement.res +778 -0
- package/src/DOMAPI/IdleDeadline.res +7 -0
- package/src/DOMAPI/ImageData.res +18 -0
- package/src/DOMAPI/Location.res +22 -0
- package/src/DOMAPI/MediaList.res +19 -0
- package/src/DOMAPI/MediaQueryList.res +82 -0
- package/src/DOMAPI/NamedNodeMap.res +45 -0
- package/src/DOMAPI/Navigator.res +114 -0
- package/src/DOMAPI/Node.res +179 -0
- package/src/DOMAPI/NodeFilter.res +4 -0
- package/src/DOMAPI/NodeIterator.res +13 -0
- package/src/DOMAPI/NodeList.res +8 -0
- package/src/DOMAPI/NodeListOf.res +9 -0
- package/src/DOMAPI/Range.res +149 -0
- package/src/DOMAPI/SVGGraphicsElement.res +675 -0
- package/src/DOMAPI/SVGLength.res +11 -0
- package/src/DOMAPI/ScreenOrientation.res +88 -0
- package/src/DOMAPI/Selection.res +103 -0
- package/src/DOMAPI/ShadowRoot.res +274 -0
- package/src/DOMAPI/StylePropertyMap.res +50 -0
- package/src/DOMAPI/StylePropertyMapReadOnly.res +13 -0
- package/src/DOMAPI/StyleSheetList.res +7 -0
- package/src/DOMAPI/Text.res +285 -0
- package/src/DOMAPI/TextTrackList.res +89 -0
- package/src/DOMAPI/TimeRanges.res +19 -0
- package/src/DOMAPI/TreeWalker.res +43 -0
- package/src/DOMAPI/VideoColorSpace.res +13 -0
- package/src/DOMAPI/VideoFrame.res +111 -0
- package/src/DOMAPI/Window.res +582 -0
- package/src/DOMAPI/XPathExpression.res +12 -0
- package/src/DOMAPI/XPathResult.res +13 -0
- package/src/DOMAPI.res +9668 -0
- package/src/EncryptedMediaExtensionsAPI/MediaKeySession.res +132 -0
- package/src/EncryptedMediaExtensionsAPI/MediaKeyStatusMap.res +13 -0
- package/src/EncryptedMediaExtensionsAPI/MediaKeySystemAccess.res +13 -0
- package/src/EncryptedMediaExtensionsAPI/MediaKeys.res +28 -0
- package/src/EncryptedMediaExtensionsAPI.res +100 -0
- package/src/EventAPI/AbortController.res +15 -0
- package/src/EventAPI/AbortSignal.res +106 -0
- package/src/EventAPI/Event.res +35 -0
- package/src/EventAPI/EventTarget.res +86 -0
- package/src/EventAPI.res +215 -0
- package/src/FetchAPI/FormData.res +58 -0
- package/src/FetchAPI/Headers.res +50 -0
- package/src/FetchAPI/Request.res +57 -0
- package/src/FetchAPI/Response.res +105 -0
- package/src/FetchAPI/URLSearchParams.res +68 -0
- package/src/FetchAPI.res +287 -0
- package/src/FileAPI/Blob.res +37 -0
- package/src/FileAPI/File.res +42 -0
- package/src/FileAPI/FileSystemDirectoryHandle.res +46 -0
- package/src/FileAPI/FileSystemFileHandle.res +23 -0
- package/src/FileAPI/FileSystemHandle.res +7 -0
- package/src/FileAPI/FileSystemWritableFileStream.res +63 -0
- package/src/FileAPI/ReadableStream.res +61 -0
- package/src/FileAPI/WritableStream.res +29 -0
- package/src/FileAPI/WritableStreamDefaultController.res +8 -0
- package/src/FileAPI.res +218 -0
- package/src/FileAndDirectoryEntriesAPI/FileSystemDirectoryEntry.res +42 -0
- package/src/FileAndDirectoryEntriesAPI/FileSystemDirectoryReader.res +12 -0
- package/src/FileAndDirectoryEntriesAPI/FileSystemEntry.res +11 -0
- package/src/FileAndDirectoryEntriesAPI.res +87 -0
- package/src/GamepadAPI/GamepadHapticActuator.res +17 -0
- package/src/GamepadAPI.res +85 -0
- package/src/GeolocationAPI/Geolocation.res +29 -0
- package/src/GeolocationAPI/GeolocationCoordinates.res +7 -0
- package/src/GeolocationAPI/GeolocationPosition.res +7 -0
- package/src/GeolocationAPI.res +78 -0
- package/src/Global.res +302 -0
- package/src/HistoryAPI/History.res +33 -0
- package/src/HistoryAPI.res +26 -0
- package/src/IndexedDBAPI/IDBDatabase.res +135 -0
- package/src/IndexedDBAPI/IDBFactory.res +31 -0
- package/src/IndexedDBAPI/IDBIndex.res +74 -0
- package/src/IndexedDBAPI/IDBObjectStore.res +167 -0
- package/src/IndexedDBAPI/IDBTransaction.res +102 -0
- package/src/IndexedDBAPI.res +205 -0
- package/src/MediaCapabilitiesAPI/MediaCapabilities.res +19 -0
- package/src/MediaCapabilitiesAPI.res +81 -0
- package/src/MediaCaptureAndStreamsAPI/MediaDeviceInfo.res +7 -0
- package/src/MediaCaptureAndStreamsAPI/MediaDevices.res +113 -0
- package/src/MediaCaptureAndStreamsAPI/MediaStream.res +142 -0
- package/src/MediaCaptureAndStreamsAPI/MediaStreamTrack.res +122 -0
- package/src/MediaCaptureAndStreamsAPI.res +194 -0
- package/src/MediaSessionAPI/MediaMetadata.res +7 -0
- package/src/MediaSessionAPI/MediaSession.res +17 -0
- package/src/MediaSessionAPI.res +83 -0
- package/src/NotificationAPI/Notification.res +102 -0
- package/src/NotificationAPI.res +82 -0
- package/src/PerformanceAPI/Performance.res +169 -0
- package/src/PerformanceAPI/PerformanceEntry.res +7 -0
- package/src/PerformanceAPI/PerformanceMark.res +15 -0
- package/src/PerformanceAPI.res +86 -0
- package/src/PermissionsAPI/Permissions.res +7 -0
- package/src/PermissionsAPI.res +39 -0
- package/src/PictureInPicture.res +18 -0
- package/src/PictureInPictureAPI.res +18 -0
- package/src/Prelude/DOMException.res +7 -0
- package/src/Prelude/DOMStringList.res +15 -0
- package/src/Prelude.res +39 -0
- package/src/PushManagerAPI/PushManager.res +25 -0
- package/src/PushManagerAPI/PushSubscription.res +19 -0
- package/src/PushManagerAPI.res +67 -0
- package/src/RemotePlaybackAPI/RemotePlayback.res +102 -0
- package/src/RemotePlaybackAPI.res +21 -0
- package/src/ResizeObserverAPI/ResizeObserver.res +27 -0
- package/src/ResizeObserverAPI.res +58 -0
- package/src/ScreenWakeLockAPI/WakeLock.res +7 -0
- package/src/ScreenWakeLockAPI/WakeLockSentinel.res +88 -0
- package/src/ScreenWakeLockAPI.res +26 -0
- package/src/ServiceWorkerAPI/Cache.res +100 -0
- package/src/ServiceWorkerAPI/CacheStorage.res +46 -0
- package/src/ServiceWorkerAPI/NavigationPreloadManager.res +25 -0
- package/src/ServiceWorkerAPI/ServiceWorker.res +101 -0
- package/src/ServiceWorkerAPI/ServiceWorkerContainer.res +114 -0
- package/src/ServiceWorkerAPI/ServiceWorkerRegistration.res +114 -0
- package/src/ServiceWorkerAPI.res +134 -0
- package/src/StorageAPI/StorageManager.res +26 -0
- package/src/StorageAPI.res +10 -0
- package/src/ViewTransitionsAPI/ViewTransition.res +7 -0
- package/src/ViewTransitionsAPI.res +23 -0
- package/src/VisualViewportAPI.res +38 -0
- package/src/WebAudioAPI/AnalyserNode.res +180 -0
- package/src/WebAudioAPI/AudioBuffer.res +35 -0
- package/src/WebAudioAPI/AudioBufferSourceNode.res +183 -0
- package/src/WebAudioAPI/AudioContext.res +266 -0
- package/src/WebAudioAPI/AudioListener.res +1 -0
- package/src/WebAudioAPI/AudioNode.res +143 -0
- package/src/WebAudioAPI/AudioParam.res +56 -0
- package/src/WebAudioAPI/AudioProcessingEvent.res +38 -0
- package/src/WebAudioAPI/AudioScheduledSourceNode.res +171 -0
- package/src/WebAudioAPI/AudioWorkletNode.res +160 -0
- package/src/WebAudioAPI/BaseAudioContext.res +212 -0
- package/src/WebAudioAPI/BiquadFilterNode.res +168 -0
- package/src/WebAudioAPI/ChannelMergerNode.res +157 -0
- package/src/WebAudioAPI/ChannelSplitterNode.res +159 -0
- package/src/WebAudioAPI/ConstantSourceNode.res +172 -0
- package/src/WebAudioAPI/ConvolverNode.res +157 -0
- package/src/WebAudioAPI/DelayNode.res +150 -0
- package/src/WebAudioAPI/DynamicsCompressorNode.res +162 -0
- package/src/WebAudioAPI/GainNode.res +149 -0
- package/src/WebAudioAPI/IIRFilterNode.res +168 -0
- package/src/WebAudioAPI/MediaElementAudioSourceNode.res +168 -0
- package/src/WebAudioAPI/MediaStreamAudioDestinationNode.res +168 -0
- package/src/WebAudioAPI/MediaStreamAudioSourceNode.res +168 -0
- package/src/WebAudioAPI/OfflineAudioCompletionEvent.res +40 -0
- package/src/WebAudioAPI/OfflineAudioContext.res +246 -0
- package/src/WebAudioAPI/OscillatorNode.res +176 -0
- package/src/WebAudioAPI/PannerNode.res +150 -0
- package/src/WebAudioAPI/PeriodicWave.res +8 -0
- package/src/WebAudioAPI/StereoPannerNode.res +157 -0
- package/src/WebAudioAPI/WaveShaperNode.res +157 -0
- package/src/WebAudioAPI/Worklet.res +13 -0
- package/src/WebAudioAPI.res +1271 -0
- package/src/WebCryptoAPI/Crypto.res +13 -0
- package/src/WebCryptoAPI/SubtleCrypto.res +173 -0
- package/src/WebCryptoAPI.res +71 -0
- package/src/WebLocksAPI/LockManager.res +29 -0
- package/src/WebLocksAPI.res +47 -0
- package/src/WebMIDIAPI.res +37 -0
- package/src/WebSocketsAPI/CloseEvent.res +37 -0
- package/src/WebSocketsAPI/MessageEvent.res +38 -0
- package/src/WebSocketsAPI/WebSocket.res +130 -0
- package/src/WebSocketsAPI.res +125 -0
- package/src/WebSpeechAPI/SpeechSynthesis.res +112 -0
- package/src/WebSpeechAPI/SpeechSynthesisUtterance.res +88 -0
- package/src/WebSpeechAPI.res +82 -0
- package/src/WebStorageAPI/Storage.res +44 -0
- package/src/WebStorageAPI/StorageEvent.res +37 -0
- package/src/WebStorageAPI.res +57 -0
- package/src/WebVTTAPI/TextTrack.res +96 -0
- package/src/WebVTTAPI/TextTrackCueList.res +10 -0
- package/src/WebVTTAPI.res +122 -0
|
@@ -0,0 +1,1271 @@
|
|
|
1
|
+
@@warning("-30")
|
|
2
|
+
|
|
3
|
+
open Prelude
|
|
4
|
+
open ChannelMessagingAPI
|
|
5
|
+
open EventAPI
|
|
6
|
+
open DOMAPI
|
|
7
|
+
open MediaCaptureAndStreamsAPI
|
|
8
|
+
|
|
9
|
+
type audioContextState =
|
|
10
|
+
| @as("closed") Closed
|
|
11
|
+
| @as("running") Running
|
|
12
|
+
| @as("suspended") Suspended
|
|
13
|
+
|
|
14
|
+
type biquadFilterType =
|
|
15
|
+
| @as("allpass") Allpass
|
|
16
|
+
| @as("bandpass") Bandpass
|
|
17
|
+
| @as("highpass") Highpass
|
|
18
|
+
| @as("highshelf") Highshelf
|
|
19
|
+
| @as("lowpass") Lowpass
|
|
20
|
+
| @as("lowshelf") Lowshelf
|
|
21
|
+
| @as("notch") Notch
|
|
22
|
+
| @as("peaking") Peaking
|
|
23
|
+
|
|
24
|
+
type channelCountMode =
|
|
25
|
+
| @as("clamped-max") ClampedMax
|
|
26
|
+
| @as("explicit") Explicit
|
|
27
|
+
| @as("max") Max
|
|
28
|
+
|
|
29
|
+
type channelInterpretation =
|
|
30
|
+
| @as("discrete") Discrete
|
|
31
|
+
| @as("speakers") Speakers
|
|
32
|
+
|
|
33
|
+
type oscillatorType =
|
|
34
|
+
| @as("custom") Custom
|
|
35
|
+
| @as("sawtooth") Sawtooth
|
|
36
|
+
| @as("sine") Sine
|
|
37
|
+
| @as("square") Square
|
|
38
|
+
| @as("triangle") Triangle
|
|
39
|
+
|
|
40
|
+
type panningModelType =
|
|
41
|
+
| HRTF
|
|
42
|
+
| @as("equalpower") Equalpower
|
|
43
|
+
|
|
44
|
+
type distanceModelType =
|
|
45
|
+
| @as("exponential") Exponential
|
|
46
|
+
| @as("inverse") Inverse
|
|
47
|
+
| @as("linear") Linear
|
|
48
|
+
|
|
49
|
+
type overSampleType =
|
|
50
|
+
| @as("2x") V2x
|
|
51
|
+
| @as("4x") V4x
|
|
52
|
+
| @as("none") None
|
|
53
|
+
|
|
54
|
+
type requestCredentials =
|
|
55
|
+
| @as("include") Include
|
|
56
|
+
| @as("omit") Omit
|
|
57
|
+
| @as("same-origin") SameOrigin
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
A short audio asset residing in memory, created from an audio file using the AudioContext.decodeAudioData() method, or from raw data using AudioContext.createBuffer(). Once put into an AudioBuffer, the audio can then be played by being passed into an AudioBufferSourceNode.
|
|
61
|
+
[See AudioBuffer on MDN](https://developer.mozilla.org/docs/Web/API/AudioBuffer)
|
|
62
|
+
*/
|
|
63
|
+
type audioBuffer = {
|
|
64
|
+
/**
|
|
65
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioBuffer/sampleRate)
|
|
66
|
+
*/
|
|
67
|
+
sampleRate: float,
|
|
68
|
+
/**
|
|
69
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioBuffer/length)
|
|
70
|
+
*/
|
|
71
|
+
length: int,
|
|
72
|
+
/**
|
|
73
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioBuffer/duration)
|
|
74
|
+
*/
|
|
75
|
+
duration: float,
|
|
76
|
+
/**
|
|
77
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioBuffer/numberOfChannels)
|
|
78
|
+
*/
|
|
79
|
+
numberOfChannels: int,
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
The Web Audio API events that occur when a ScriptProcessorNode input buffer is ready to be processed.
|
|
84
|
+
[See AudioProcessingEvent on MDN](https://developer.mozilla.org/docs/Web/API/AudioProcessingEvent)
|
|
85
|
+
*/
|
|
86
|
+
type audioProcessingEvent = {
|
|
87
|
+
...event,
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
The Web Audio API OfflineAudioCompletionEvent interface represents events that occur when the processing of an OfflineAudioContext is terminated. The complete event implements this interface.
|
|
92
|
+
[See OfflineAudioCompletionEvent on MDN](https://developer.mozilla.org/docs/Web/API/OfflineAudioCompletionEvent)
|
|
93
|
+
*/
|
|
94
|
+
type offlineAudioCompletionEvent = {
|
|
95
|
+
...event,
|
|
96
|
+
/**
|
|
97
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OfflineAudioCompletionEvent/renderedBuffer)
|
|
98
|
+
*/
|
|
99
|
+
renderedBuffer: audioBuffer,
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
[See Worklet on MDN](https://developer.mozilla.org/docs/Web/API/Worklet)
|
|
104
|
+
*/
|
|
105
|
+
type worklet = {}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
A generic interface for representing an audio processing module. Examples include:
|
|
109
|
+
[See AudioNode on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode)
|
|
110
|
+
*/
|
|
111
|
+
type rec audioNode = {
|
|
112
|
+
...eventTarget,
|
|
113
|
+
/**
|
|
114
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
115
|
+
*/
|
|
116
|
+
context: baseAudioContext,
|
|
117
|
+
/**
|
|
118
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
119
|
+
*/
|
|
120
|
+
numberOfInputs: int,
|
|
121
|
+
/**
|
|
122
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
123
|
+
*/
|
|
124
|
+
numberOfOutputs: int,
|
|
125
|
+
/**
|
|
126
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
127
|
+
*/
|
|
128
|
+
mutable channelCount: int,
|
|
129
|
+
/**
|
|
130
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
131
|
+
*/
|
|
132
|
+
mutable channelCountMode: channelCountMode,
|
|
133
|
+
/**
|
|
134
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
135
|
+
*/
|
|
136
|
+
mutable channelInterpretation: channelInterpretation,
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
AudioDestinationNode has no output (as it is the output, no more AudioNode can be linked after it in the audio graph) and one input. The number of channels in the input must be between 0 and the maxChannelCount value or an exception is raised.
|
|
141
|
+
[See AudioDestinationNode on MDN](https://developer.mozilla.org/docs/Web/API/AudioDestinationNode)
|
|
142
|
+
*/
|
|
143
|
+
and audioDestinationNode = {
|
|
144
|
+
// Base properties from AudioNode
|
|
145
|
+
/**
|
|
146
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
147
|
+
*/
|
|
148
|
+
context: baseAudioContext,
|
|
149
|
+
/**
|
|
150
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
151
|
+
*/
|
|
152
|
+
numberOfInputs: int,
|
|
153
|
+
/**
|
|
154
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
155
|
+
*/
|
|
156
|
+
numberOfOutputs: int,
|
|
157
|
+
/**
|
|
158
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
159
|
+
*/
|
|
160
|
+
mutable channelCount: int,
|
|
161
|
+
/**
|
|
162
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
163
|
+
*/
|
|
164
|
+
mutable channelCountMode: channelCountMode,
|
|
165
|
+
/**
|
|
166
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
167
|
+
*/
|
|
168
|
+
mutable channelInterpretation: channelInterpretation,
|
|
169
|
+
// End base properties from AudioNode
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioDestinationNode/maxChannelCount)
|
|
173
|
+
*/
|
|
174
|
+
maxChannelCount: int,
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
[See BaseAudioContext on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext)
|
|
179
|
+
*/
|
|
180
|
+
and baseAudioContext = {
|
|
181
|
+
...eventTarget,
|
|
182
|
+
/**
|
|
183
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/destination)
|
|
184
|
+
*/
|
|
185
|
+
destination: audioDestinationNode,
|
|
186
|
+
/**
|
|
187
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/sampleRate)
|
|
188
|
+
*/
|
|
189
|
+
sampleRate: float,
|
|
190
|
+
/**
|
|
191
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/currentTime)
|
|
192
|
+
*/
|
|
193
|
+
currentTime: float,
|
|
194
|
+
/**
|
|
195
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/listener)
|
|
196
|
+
*/
|
|
197
|
+
listener: audioListener,
|
|
198
|
+
/**
|
|
199
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/state)
|
|
200
|
+
*/
|
|
201
|
+
state: audioContextState,
|
|
202
|
+
/**
|
|
203
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/audioWorklet)
|
|
204
|
+
*/
|
|
205
|
+
audioWorklet: audioWorklet,
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
A simple low-order filter, and is created using the AudioContext.createBiquadFilter() method. It is an AudioNode that can represent different kinds of filters, tone control devices, and graphic equalizers.
|
|
210
|
+
[See BiquadFilterNode on MDN](https://developer.mozilla.org/docs/Web/API/BiquadFilterNode)
|
|
211
|
+
*/
|
|
212
|
+
and biquadFilterNode = {
|
|
213
|
+
// Base properties from AudioNode
|
|
214
|
+
/**
|
|
215
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
216
|
+
*/
|
|
217
|
+
context: baseAudioContext,
|
|
218
|
+
/**
|
|
219
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
220
|
+
*/
|
|
221
|
+
numberOfInputs: int,
|
|
222
|
+
/**
|
|
223
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
224
|
+
*/
|
|
225
|
+
numberOfOutputs: int,
|
|
226
|
+
/**
|
|
227
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
228
|
+
*/
|
|
229
|
+
mutable channelCount: int,
|
|
230
|
+
/**
|
|
231
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
232
|
+
*/
|
|
233
|
+
mutable channelCountMode: channelCountMode,
|
|
234
|
+
/**
|
|
235
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
236
|
+
*/
|
|
237
|
+
mutable channelInterpretation: channelInterpretation,
|
|
238
|
+
// End base properties from AudioNode
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/BiquadFilterNode/type)
|
|
242
|
+
*/
|
|
243
|
+
@as("type")
|
|
244
|
+
mutable type_: biquadFilterType,
|
|
245
|
+
/**
|
|
246
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/BiquadFilterNode/frequency)
|
|
247
|
+
*/
|
|
248
|
+
frequency: audioParam,
|
|
249
|
+
/**
|
|
250
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/BiquadFilterNode/detune)
|
|
251
|
+
*/
|
|
252
|
+
detune: audioParam,
|
|
253
|
+
/**
|
|
254
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/BiquadFilterNode/Q)
|
|
255
|
+
*/
|
|
256
|
+
@as("Q")
|
|
257
|
+
q: audioParam,
|
|
258
|
+
/**
|
|
259
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/BiquadFilterNode/gain)
|
|
260
|
+
*/
|
|
261
|
+
gain: audioParam,
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
The position and orientation of the unique person listening to the audio scene, and is used in audio spatialization. All PannerNodes spatialize in relation to the AudioListener stored in the BaseAudioContext.listener attribute.
|
|
266
|
+
[See AudioListener on MDN](https://developer.mozilla.org/docs/Web/API/AudioListener)
|
|
267
|
+
*/
|
|
268
|
+
and audioListener = {
|
|
269
|
+
/**
|
|
270
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioListener/positionX)
|
|
271
|
+
*/
|
|
272
|
+
positionX: audioParam,
|
|
273
|
+
/**
|
|
274
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioListener/positionY)
|
|
275
|
+
*/
|
|
276
|
+
positionY: audioParam,
|
|
277
|
+
/**
|
|
278
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioListener/positionZ)
|
|
279
|
+
*/
|
|
280
|
+
positionZ: audioParam,
|
|
281
|
+
/**
|
|
282
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioListener/forwardX)
|
|
283
|
+
*/
|
|
284
|
+
forwardX: audioParam,
|
|
285
|
+
/**
|
|
286
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioListener/forwardY)
|
|
287
|
+
*/
|
|
288
|
+
forwardY: audioParam,
|
|
289
|
+
/**
|
|
290
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioListener/forwardZ)
|
|
291
|
+
*/
|
|
292
|
+
forwardZ: audioParam,
|
|
293
|
+
/**
|
|
294
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioListener/upX)
|
|
295
|
+
*/
|
|
296
|
+
upX: audioParam,
|
|
297
|
+
/**
|
|
298
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioListener/upY)
|
|
299
|
+
*/
|
|
300
|
+
upY: audioParam,
|
|
301
|
+
/**
|
|
302
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioListener/upZ)
|
|
303
|
+
*/
|
|
304
|
+
upZ: audioParam,
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
[See AudioWorklet on MDN](https://developer.mozilla.org/docs/Web/API/AudioWorklet)
|
|
309
|
+
*/
|
|
310
|
+
and audioWorklet = {
|
|
311
|
+
...worklet,
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
The Web Audio API's AudioParam interface represents an audio-related parameter, usually a parameter of an AudioNode (such as GainNode.gain).
|
|
316
|
+
[See AudioParam on MDN](https://developer.mozilla.org/docs/Web/API/AudioParam)
|
|
317
|
+
*/
|
|
318
|
+
and audioParam = {
|
|
319
|
+
/**
|
|
320
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioParam/value)
|
|
321
|
+
*/
|
|
322
|
+
mutable value: float,
|
|
323
|
+
/**
|
|
324
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioParam/defaultValue)
|
|
325
|
+
*/
|
|
326
|
+
defaultValue: float,
|
|
327
|
+
/**
|
|
328
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioParam/minValue)
|
|
329
|
+
*/
|
|
330
|
+
minValue: float,
|
|
331
|
+
/**
|
|
332
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioParam/maxValue)
|
|
333
|
+
*/
|
|
334
|
+
maxValue: float,
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
[See AudioScheduledSourceNode on MDN](https://developer.mozilla.org/docs/Web/API/AudioScheduledSourceNode)
|
|
339
|
+
*/
|
|
340
|
+
and audioScheduledSourceNode = {
|
|
341
|
+
// Base properties from AudioNode
|
|
342
|
+
/**
|
|
343
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
344
|
+
*/
|
|
345
|
+
context: baseAudioContext,
|
|
346
|
+
/**
|
|
347
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
348
|
+
*/
|
|
349
|
+
numberOfInputs: int,
|
|
350
|
+
/**
|
|
351
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
352
|
+
*/
|
|
353
|
+
numberOfOutputs: int,
|
|
354
|
+
/**
|
|
355
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
356
|
+
*/
|
|
357
|
+
mutable channelCount: int,
|
|
358
|
+
/**
|
|
359
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
360
|
+
*/
|
|
361
|
+
mutable channelCountMode: channelCountMode,
|
|
362
|
+
/**
|
|
363
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
364
|
+
*/
|
|
365
|
+
mutable channelInterpretation: channelInterpretation,
|
|
366
|
+
// End base properties from AudioNode
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
An AudioScheduledSourceNode which represents an audio source consisting of in-memory audio data, stored in an AudioBuffer. It's especially useful for playing back audio which has particularly stringent timing accuracy requirements, such as for sounds that must match a specific rhythm and can be kept in memory rather than being played from disk or the network.
|
|
371
|
+
[See AudioBufferSourceNode on MDN](https://developer.mozilla.org/docs/Web/API/AudioBufferSourceNode)
|
|
372
|
+
*/
|
|
373
|
+
and audioBufferSourceNode = {
|
|
374
|
+
// Base properties from AudioScheduledSourceNode
|
|
375
|
+
// End base properties from AudioScheduledSourceNode
|
|
376
|
+
|
|
377
|
+
// Base properties from AudioNode
|
|
378
|
+
/**
|
|
379
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
380
|
+
*/
|
|
381
|
+
context: baseAudioContext,
|
|
382
|
+
/**
|
|
383
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
384
|
+
*/
|
|
385
|
+
numberOfInputs: int,
|
|
386
|
+
/**
|
|
387
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
388
|
+
*/
|
|
389
|
+
numberOfOutputs: int,
|
|
390
|
+
/**
|
|
391
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
392
|
+
*/
|
|
393
|
+
mutable channelCount: int,
|
|
394
|
+
/**
|
|
395
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
396
|
+
*/
|
|
397
|
+
mutable channelCountMode: channelCountMode,
|
|
398
|
+
/**
|
|
399
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
400
|
+
*/
|
|
401
|
+
mutable channelInterpretation: channelInterpretation,
|
|
402
|
+
// End base properties from AudioNode
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioBufferSourceNode/buffer)
|
|
406
|
+
*/
|
|
407
|
+
mutable buffer: Null.t<audioBuffer>,
|
|
408
|
+
/**
|
|
409
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioBufferSourceNode/playbackRate)
|
|
410
|
+
*/
|
|
411
|
+
playbackRate: audioParam,
|
|
412
|
+
/**
|
|
413
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioBufferSourceNode/detune)
|
|
414
|
+
*/
|
|
415
|
+
detune: audioParam,
|
|
416
|
+
/**
|
|
417
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioBufferSourceNode/loop)
|
|
418
|
+
*/
|
|
419
|
+
mutable loop: bool,
|
|
420
|
+
/**
|
|
421
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioBufferSourceNode/loopStart)
|
|
422
|
+
*/
|
|
423
|
+
mutable loopStart: float,
|
|
424
|
+
/**
|
|
425
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioBufferSourceNode/loopEnd)
|
|
426
|
+
*/
|
|
427
|
+
mutable loopEnd: float,
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
The ChannelMergerNode interface, often used in conjunction with its opposite, ChannelSplitterNode, reunites different mono inputs into a single output. Each input is used to fill a channel of the output. This is useful for accessing each channels separately, e.g. for performing channel mixing where gain must be separately controlled on each channel.
|
|
432
|
+
[See ChannelMergerNode on MDN](https://developer.mozilla.org/docs/Web/API/ChannelMergerNode)
|
|
433
|
+
*/
|
|
434
|
+
and channelMergerNode = {
|
|
435
|
+
// Base properties from AudioNode
|
|
436
|
+
/**
|
|
437
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
438
|
+
*/
|
|
439
|
+
context: baseAudioContext,
|
|
440
|
+
/**
|
|
441
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
442
|
+
*/
|
|
443
|
+
numberOfInputs: int,
|
|
444
|
+
/**
|
|
445
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
446
|
+
*/
|
|
447
|
+
numberOfOutputs: int,
|
|
448
|
+
/**
|
|
449
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
450
|
+
*/
|
|
451
|
+
mutable channelCount: int,
|
|
452
|
+
/**
|
|
453
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
454
|
+
*/
|
|
455
|
+
mutable channelCountMode: channelCountMode,
|
|
456
|
+
/**
|
|
457
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
458
|
+
*/
|
|
459
|
+
mutable channelInterpretation: channelInterpretation,
|
|
460
|
+
// End base properties from AudioNode
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
The ChannelSplitterNode interface, often used in conjunction with its opposite, ChannelMergerNode, separates the different channels of an audio source into a set of mono outputs. This is useful for accessing each channel separately, e.g. for performing channel mixing where gain must be separately controlled on each channel.
|
|
465
|
+
[See ChannelSplitterNode on MDN](https://developer.mozilla.org/docs/Web/API/ChannelSplitterNode)
|
|
466
|
+
*/
|
|
467
|
+
and channelSplitterNode = {
|
|
468
|
+
// Base properties from AudioNode
|
|
469
|
+
/**
|
|
470
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
471
|
+
*/
|
|
472
|
+
context: baseAudioContext,
|
|
473
|
+
/**
|
|
474
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
475
|
+
*/
|
|
476
|
+
numberOfInputs: int,
|
|
477
|
+
/**
|
|
478
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
479
|
+
*/
|
|
480
|
+
numberOfOutputs: int,
|
|
481
|
+
/**
|
|
482
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
483
|
+
*/
|
|
484
|
+
mutable channelCount: int,
|
|
485
|
+
/**
|
|
486
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
487
|
+
*/
|
|
488
|
+
mutable channelCountMode: channelCountMode,
|
|
489
|
+
/**
|
|
490
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
491
|
+
*/
|
|
492
|
+
mutable channelInterpretation: channelInterpretation,
|
|
493
|
+
// End base properties from AudioNode
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
[See ConstantSourceNode on MDN](https://developer.mozilla.org/docs/Web/API/ConstantSourceNode)
|
|
498
|
+
*/
|
|
499
|
+
and constantSourceNode = {
|
|
500
|
+
// Base properties from AudioScheduledSourceNode
|
|
501
|
+
// End base properties from AudioScheduledSourceNode
|
|
502
|
+
|
|
503
|
+
// Base properties from AudioNode
|
|
504
|
+
/**
|
|
505
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
506
|
+
*/
|
|
507
|
+
context: baseAudioContext,
|
|
508
|
+
/**
|
|
509
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
510
|
+
*/
|
|
511
|
+
numberOfInputs: int,
|
|
512
|
+
/**
|
|
513
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
514
|
+
*/
|
|
515
|
+
numberOfOutputs: int,
|
|
516
|
+
/**
|
|
517
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
518
|
+
*/
|
|
519
|
+
mutable channelCount: int,
|
|
520
|
+
/**
|
|
521
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
522
|
+
*/
|
|
523
|
+
mutable channelCountMode: channelCountMode,
|
|
524
|
+
/**
|
|
525
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
526
|
+
*/
|
|
527
|
+
mutable channelInterpretation: channelInterpretation,
|
|
528
|
+
// End base properties from AudioNode
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ConstantSourceNode/offset)
|
|
532
|
+
*/
|
|
533
|
+
offset: audioParam,
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
An AudioNode that performs a Linear Convolution on a given AudioBuffer, often used to achieve a reverb effect. A ConvolverNode always has exactly one input and one output.
|
|
538
|
+
[See ConvolverNode on MDN](https://developer.mozilla.org/docs/Web/API/ConvolverNode)
|
|
539
|
+
*/
|
|
540
|
+
and convolverNode = {
|
|
541
|
+
// Base properties from AudioNode
|
|
542
|
+
/**
|
|
543
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
544
|
+
*/
|
|
545
|
+
context: baseAudioContext,
|
|
546
|
+
/**
|
|
547
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
548
|
+
*/
|
|
549
|
+
numberOfInputs: int,
|
|
550
|
+
/**
|
|
551
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
552
|
+
*/
|
|
553
|
+
numberOfOutputs: int,
|
|
554
|
+
/**
|
|
555
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
556
|
+
*/
|
|
557
|
+
mutable channelCount: int,
|
|
558
|
+
/**
|
|
559
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
560
|
+
*/
|
|
561
|
+
mutable channelCountMode: channelCountMode,
|
|
562
|
+
/**
|
|
563
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
564
|
+
*/
|
|
565
|
+
mutable channelInterpretation: channelInterpretation,
|
|
566
|
+
// End base properties from AudioNode
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ConvolverNode/buffer)
|
|
570
|
+
*/
|
|
571
|
+
mutable buffer: Null.t<audioBuffer>,
|
|
572
|
+
/**
|
|
573
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ConvolverNode/normalize)
|
|
574
|
+
*/
|
|
575
|
+
mutable normalize: bool,
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
A delay-line; an AudioNode audio-processing module that causes a delay between the arrival of an input data and its propagation to the output.
|
|
580
|
+
[See DelayNode on MDN](https://developer.mozilla.org/docs/Web/API/DelayNode)
|
|
581
|
+
*/
|
|
582
|
+
and delayNode = {
|
|
583
|
+
// Base properties from AudioNode
|
|
584
|
+
/**
|
|
585
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
586
|
+
*/
|
|
587
|
+
context: baseAudioContext,
|
|
588
|
+
/**
|
|
589
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
590
|
+
*/
|
|
591
|
+
numberOfInputs: int,
|
|
592
|
+
/**
|
|
593
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
594
|
+
*/
|
|
595
|
+
numberOfOutputs: int,
|
|
596
|
+
/**
|
|
597
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
598
|
+
*/
|
|
599
|
+
mutable channelCount: int,
|
|
600
|
+
/**
|
|
601
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
602
|
+
*/
|
|
603
|
+
mutable channelCountMode: channelCountMode,
|
|
604
|
+
/**
|
|
605
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
606
|
+
*/
|
|
607
|
+
mutable channelInterpretation: channelInterpretation,
|
|
608
|
+
// End base properties from AudioNode
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DelayNode/delayTime)
|
|
612
|
+
*/
|
|
613
|
+
delayTime: audioParam,
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
Inherits properties from its parent, AudioNode.
|
|
618
|
+
[See DynamicsCompressorNode on MDN](https://developer.mozilla.org/docs/Web/API/DynamicsCompressorNode)
|
|
619
|
+
*/
|
|
620
|
+
and dynamicsCompressorNode = {
|
|
621
|
+
// Base properties from AudioNode
|
|
622
|
+
/**
|
|
623
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
624
|
+
*/
|
|
625
|
+
context: baseAudioContext,
|
|
626
|
+
/**
|
|
627
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
628
|
+
*/
|
|
629
|
+
numberOfInputs: int,
|
|
630
|
+
/**
|
|
631
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
632
|
+
*/
|
|
633
|
+
numberOfOutputs: int,
|
|
634
|
+
/**
|
|
635
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
636
|
+
*/
|
|
637
|
+
mutable channelCount: int,
|
|
638
|
+
/**
|
|
639
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
640
|
+
*/
|
|
641
|
+
mutable channelCountMode: channelCountMode,
|
|
642
|
+
/**
|
|
643
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
644
|
+
*/
|
|
645
|
+
mutable channelInterpretation: channelInterpretation,
|
|
646
|
+
// End base properties from AudioNode
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DynamicsCompressorNode/threshold)
|
|
650
|
+
*/
|
|
651
|
+
threshold: audioParam,
|
|
652
|
+
/**
|
|
653
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DynamicsCompressorNode/knee)
|
|
654
|
+
*/
|
|
655
|
+
knee: audioParam,
|
|
656
|
+
/**
|
|
657
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DynamicsCompressorNode/ratio)
|
|
658
|
+
*/
|
|
659
|
+
ratio: audioParam,
|
|
660
|
+
/**
|
|
661
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DynamicsCompressorNode/reduction)
|
|
662
|
+
*/
|
|
663
|
+
reduction: float,
|
|
664
|
+
/**
|
|
665
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DynamicsCompressorNode/attack)
|
|
666
|
+
*/
|
|
667
|
+
attack: audioParam,
|
|
668
|
+
/**
|
|
669
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DynamicsCompressorNode/release)
|
|
670
|
+
*/
|
|
671
|
+
release: audioParam,
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
A change in volume. It is an AudioNode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output. A GainNode always has exactly one input and one output, both with the same number of channels.
|
|
676
|
+
[See GainNode on MDN](https://developer.mozilla.org/docs/Web/API/GainNode)
|
|
677
|
+
*/
|
|
678
|
+
and gainNode = {
|
|
679
|
+
// Base properties from AudioNode
|
|
680
|
+
/**
|
|
681
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
682
|
+
*/
|
|
683
|
+
context: baseAudioContext,
|
|
684
|
+
/**
|
|
685
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
686
|
+
*/
|
|
687
|
+
numberOfInputs: int,
|
|
688
|
+
/**
|
|
689
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
690
|
+
*/
|
|
691
|
+
numberOfOutputs: int,
|
|
692
|
+
/**
|
|
693
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
694
|
+
*/
|
|
695
|
+
mutable channelCount: int,
|
|
696
|
+
/**
|
|
697
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
698
|
+
*/
|
|
699
|
+
mutable channelCountMode: channelCountMode,
|
|
700
|
+
/**
|
|
701
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
702
|
+
*/
|
|
703
|
+
mutable channelInterpretation: channelInterpretation,
|
|
704
|
+
// End base properties from AudioNode
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GainNode/gain)
|
|
708
|
+
*/
|
|
709
|
+
gain: audioParam,
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
The IIRFilterNode interface of the Web Audio API is a AudioNode processor which implements a general infinite impulse response (IIR) filter; this type of filter can be used to implement tone control devices and graphic equalizers as well. It lets the parameters of the filter response be specified, so that it can be tuned as needed.
|
|
714
|
+
[See IIRFilterNode on MDN](https://developer.mozilla.org/docs/Web/API/IIRFilterNode)
|
|
715
|
+
*/
|
|
716
|
+
and iirFilterNode = {
|
|
717
|
+
// Base properties from AudioNode
|
|
718
|
+
/**
|
|
719
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
720
|
+
*/
|
|
721
|
+
context: baseAudioContext,
|
|
722
|
+
/**
|
|
723
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
724
|
+
*/
|
|
725
|
+
numberOfInputs: int,
|
|
726
|
+
/**
|
|
727
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
728
|
+
*/
|
|
729
|
+
numberOfOutputs: int,
|
|
730
|
+
/**
|
|
731
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
732
|
+
*/
|
|
733
|
+
mutable channelCount: int,
|
|
734
|
+
/**
|
|
735
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
736
|
+
*/
|
|
737
|
+
mutable channelCountMode: channelCountMode,
|
|
738
|
+
/**
|
|
739
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
740
|
+
*/
|
|
741
|
+
mutable channelInterpretation: channelInterpretation,
|
|
742
|
+
// End base properties from AudioNode
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
The OscillatorNode interface represents a periodic waveform, such as a sine wave. It is an AudioScheduledSourceNode audio-processing module that causes a specified frequency of a given wave to be created—in effect, a constant tone.
|
|
747
|
+
[See OscillatorNode on MDN](https://developer.mozilla.org/docs/Web/API/OscillatorNode)
|
|
748
|
+
*/
|
|
749
|
+
and oscillatorNode = {
|
|
750
|
+
// Base properties from AudioScheduledSourceNode
|
|
751
|
+
// End base properties from AudioScheduledSourceNode
|
|
752
|
+
|
|
753
|
+
// Base properties from AudioNode
|
|
754
|
+
/**
|
|
755
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
756
|
+
*/
|
|
757
|
+
context: baseAudioContext,
|
|
758
|
+
/**
|
|
759
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
760
|
+
*/
|
|
761
|
+
numberOfInputs: int,
|
|
762
|
+
/**
|
|
763
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
764
|
+
*/
|
|
765
|
+
numberOfOutputs: int,
|
|
766
|
+
/**
|
|
767
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
768
|
+
*/
|
|
769
|
+
mutable channelCount: int,
|
|
770
|
+
/**
|
|
771
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
772
|
+
*/
|
|
773
|
+
mutable channelCountMode: channelCountMode,
|
|
774
|
+
/**
|
|
775
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
776
|
+
*/
|
|
777
|
+
mutable channelInterpretation: channelInterpretation,
|
|
778
|
+
// End base properties from AudioNode
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OscillatorNode/type)
|
|
782
|
+
*/
|
|
783
|
+
@as("type")
|
|
784
|
+
mutable type_: oscillatorType,
|
|
785
|
+
/**
|
|
786
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OscillatorNode/frequency)
|
|
787
|
+
*/
|
|
788
|
+
frequency: audioParam,
|
|
789
|
+
/**
|
|
790
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OscillatorNode/detune)
|
|
791
|
+
*/
|
|
792
|
+
detune: audioParam,
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
A PannerNode always has exactly one input and one output: the input can be mono or stereo but the output is always stereo (2 channels); you can't have panning effects without at least two audio channels!
|
|
797
|
+
[See PannerNode on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode)
|
|
798
|
+
*/
|
|
799
|
+
and pannerNode = {
|
|
800
|
+
// Base properties from AudioNode
|
|
801
|
+
/**
|
|
802
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/context)
|
|
803
|
+
*/
|
|
804
|
+
context: baseAudioContext,
|
|
805
|
+
/**
|
|
806
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
|
|
807
|
+
*/
|
|
808
|
+
numberOfInputs: int,
|
|
809
|
+
/**
|
|
810
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
|
|
811
|
+
*/
|
|
812
|
+
numberOfOutputs: int,
|
|
813
|
+
/**
|
|
814
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
|
|
815
|
+
*/
|
|
816
|
+
mutable channelCount: int,
|
|
817
|
+
/**
|
|
818
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
|
|
819
|
+
*/
|
|
820
|
+
mutable channelCountMode: channelCountMode,
|
|
821
|
+
/**
|
|
822
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/channelInterpretation)
|
|
823
|
+
*/
|
|
824
|
+
mutable channelInterpretation: channelInterpretation,
|
|
825
|
+
// End base properties from AudioNode
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode/panningModel)
|
|
829
|
+
*/
|
|
830
|
+
mutable panningModel: panningModelType,
|
|
831
|
+
/**
|
|
832
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode/positionX)
|
|
833
|
+
*/
|
|
834
|
+
positionX: audioParam,
|
|
835
|
+
/**
|
|
836
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode/positionY)
|
|
837
|
+
*/
|
|
838
|
+
positionY: audioParam,
|
|
839
|
+
/**
|
|
840
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode/positionZ)
|
|
841
|
+
*/
|
|
842
|
+
positionZ: audioParam,
|
|
843
|
+
/**
|
|
844
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode/orientationX)
|
|
845
|
+
*/
|
|
846
|
+
orientationX: audioParam,
|
|
847
|
+
/**
|
|
848
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode/orientationY)
|
|
849
|
+
*/
|
|
850
|
+
orientationY: audioParam,
|
|
851
|
+
/**
|
|
852
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode/orientationZ)
|
|
853
|
+
*/
|
|
854
|
+
orientationZ: audioParam,
|
|
855
|
+
/**
|
|
856
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode/distanceModel)
|
|
857
|
+
*/
|
|
858
|
+
mutable distanceModel: distanceModelType,
|
|
859
|
+
/**
|
|
860
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode/refDistance)
|
|
861
|
+
*/
|
|
862
|
+
mutable refDistance: float,
|
|
863
|
+
/**
|
|
864
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode/maxDistance)
|
|
865
|
+
*/
|
|
866
|
+
mutable maxDistance: float,
|
|
867
|
+
/**
|
|
868
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode/rolloffFactor)
|
|
869
|
+
*/
|
|
870
|
+
mutable rolloffFactor: float,
|
|
871
|
+
/**
|
|
872
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode/coneInnerAngle)
|
|
873
|
+
*/
|
|
874
|
+
mutable coneInnerAngle: float,
|
|
875
|
+
/**
|
|
876
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode/coneOuterAngle)
|
|
877
|
+
*/
|
|
878
|
+
mutable coneOuterAngle: float,
|
|
879
|
+
/**
|
|
880
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode/coneOuterGain)
|
|
881
|
+
*/
|
|
882
|
+
mutable coneOuterGain: float,
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
A node able to provide real-time frequency and time-domain analysis information. It is an AudioNode that passes the audio stream unchanged from the input to the output, but allows you to take the generated data, process it, and create audio visualizations.
|
|
887
|
+
[See AnalyserNode on MDN](https://developer.mozilla.org/docs/Web/API/AnalyserNode)
|
|
888
|
+
*/
|
|
889
|
+
type analyserNode = {
|
|
890
|
+
...audioNode,
|
|
891
|
+
/**
|
|
892
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AnalyserNode/fftSize)
|
|
893
|
+
*/
|
|
894
|
+
mutable fftSize: int,
|
|
895
|
+
/**
|
|
896
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AnalyserNode/frequencyBinCount)
|
|
897
|
+
*/
|
|
898
|
+
frequencyBinCount: int,
|
|
899
|
+
/**
|
|
900
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AnalyserNode/minDecibels)
|
|
901
|
+
*/
|
|
902
|
+
mutable minDecibels: float,
|
|
903
|
+
/**
|
|
904
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AnalyserNode/maxDecibels)
|
|
905
|
+
*/
|
|
906
|
+
mutable maxDecibels: float,
|
|
907
|
+
/**
|
|
908
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AnalyserNode/smoothingTimeConstant)
|
|
909
|
+
*/
|
|
910
|
+
mutable smoothingTimeConstant: float,
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
PeriodicWave has no inputs or outputs; it is used to define custom oscillators when calling OscillatorNode.setPeriodicWave(). The PeriodicWave itself is created/returned by AudioContext.createPeriodicWave().
|
|
915
|
+
[See PeriodicWave on MDN](https://developer.mozilla.org/docs/Web/API/PeriodicWave)
|
|
916
|
+
*/
|
|
917
|
+
type periodicWave = {}
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
The pan property takes a unitless value between -1 (full left pan) and 1 (full right pan). This interface was introduced as a much simpler way to apply a simple panning effect than having to use a full PannerNode.
|
|
921
|
+
[See StereoPannerNode on MDN](https://developer.mozilla.org/docs/Web/API/StereoPannerNode)
|
|
922
|
+
*/
|
|
923
|
+
type stereoPannerNode = {
|
|
924
|
+
...audioNode,
|
|
925
|
+
/**
|
|
926
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StereoPannerNode/pan)
|
|
927
|
+
*/
|
|
928
|
+
pan: audioParam,
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
/**
|
|
932
|
+
A WaveShaperNode always has exactly one input and one output.
|
|
933
|
+
[See WaveShaperNode on MDN](https://developer.mozilla.org/docs/Web/API/WaveShaperNode)
|
|
934
|
+
*/
|
|
935
|
+
type waveShaperNode = {
|
|
936
|
+
...audioNode,
|
|
937
|
+
/**
|
|
938
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WaveShaperNode/curve)
|
|
939
|
+
*/
|
|
940
|
+
mutable curve: Null.t<array<float>>,
|
|
941
|
+
/**
|
|
942
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WaveShaperNode/oversample)
|
|
943
|
+
*/
|
|
944
|
+
mutable oversample: overSampleType,
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
An audio-processing graph built from audio modules linked together, each represented by an AudioNode.
|
|
949
|
+
[See AudioContext on MDN](https://developer.mozilla.org/docs/Web/API/AudioContext)
|
|
950
|
+
*/
|
|
951
|
+
type audioContext = {
|
|
952
|
+
...baseAudioContext,
|
|
953
|
+
/**
|
|
954
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioContext/baseLatency)
|
|
955
|
+
*/
|
|
956
|
+
baseLatency: float,
|
|
957
|
+
/**
|
|
958
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioContext/outputLatency)
|
|
959
|
+
*/
|
|
960
|
+
outputLatency: float,
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
/**
|
|
964
|
+
A MediaElementSourceNode has no inputs and exactly one output, and is created using the AudioContext.createMediaElementSource method. The amount of channels in the output equals the number of channels of the audio referenced by the HTMLMediaElement used in the creation of the node, or is 1 if the HTMLMediaElement has no audio.
|
|
965
|
+
[See MediaElementAudioSourceNode on MDN](https://developer.mozilla.org/docs/Web/API/MediaElementAudioSourceNode)
|
|
966
|
+
*/
|
|
967
|
+
type mediaElementAudioSourceNode = {
|
|
968
|
+
...audioNode,
|
|
969
|
+
/**
|
|
970
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaElementAudioSourceNode/mediaElement)
|
|
971
|
+
*/
|
|
972
|
+
mediaElement: htmlMediaElement,
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
A type of AudioNode which operates as an audio source whose media is received from a MediaStream obtained using the WebRTC or Media Capture and Streams APIs.
|
|
977
|
+
[See MediaStreamAudioSourceNode on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamAudioSourceNode)
|
|
978
|
+
*/
|
|
979
|
+
type mediaStreamAudioSourceNode = {
|
|
980
|
+
...audioNode,
|
|
981
|
+
/**
|
|
982
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamAudioSourceNode/mediaStream)
|
|
983
|
+
*/
|
|
984
|
+
mediaStream: mediaStream,
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
[See MediaStreamAudioDestinationNode on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamAudioDestinationNode)
|
|
989
|
+
*/
|
|
990
|
+
type mediaStreamAudioDestinationNode = {
|
|
991
|
+
...audioNode,
|
|
992
|
+
/**
|
|
993
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamAudioDestinationNode/stream)
|
|
994
|
+
*/
|
|
995
|
+
stream: mediaStream,
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
[See AudioParamMap on MDN](https://developer.mozilla.org/docs/Web/API/AudioParamMap)
|
|
1000
|
+
*/
|
|
1001
|
+
type audioParamMap = {}
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
[See AudioWorkletNode on MDN](https://developer.mozilla.org/docs/Web/API/AudioWorkletNode)
|
|
1005
|
+
*/
|
|
1006
|
+
type audioWorkletNode = {
|
|
1007
|
+
...audioNode,
|
|
1008
|
+
/**
|
|
1009
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioWorkletNode/parameters)
|
|
1010
|
+
*/
|
|
1011
|
+
parameters: audioParamMap,
|
|
1012
|
+
/**
|
|
1013
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioWorkletNode/port)
|
|
1014
|
+
*/
|
|
1015
|
+
port: messagePort,
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
An AudioContext interface representing an audio-processing graph built from linked together AudioNodes. In contrast with a standard AudioContext, an OfflineAudioContext doesn't render the audio to the device hardware; instead, it generates it, as fast as it can, and outputs the result to an AudioBuffer.
|
|
1020
|
+
[See OfflineAudioContext on MDN](https://developer.mozilla.org/docs/Web/API/OfflineAudioContext)
|
|
1021
|
+
*/
|
|
1022
|
+
type offlineAudioContext = {
|
|
1023
|
+
...baseAudioContext,
|
|
1024
|
+
/**
|
|
1025
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OfflineAudioContext/length)
|
|
1026
|
+
*/
|
|
1027
|
+
length: int,
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
type periodicWaveConstraints = {mutable disableNormalization?: bool}
|
|
1031
|
+
|
|
1032
|
+
type audioTimestamp = {
|
|
1033
|
+
mutable contextTime?: float,
|
|
1034
|
+
mutable performanceTime?: float,
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
type uLongRange = {
|
|
1038
|
+
mutable max?: int,
|
|
1039
|
+
mutable min?: int,
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
type doubleRange = {
|
|
1043
|
+
mutable max?: float,
|
|
1044
|
+
mutable min?: float,
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
type mediaTrackCapabilities = {
|
|
1048
|
+
mutable width?: uLongRange,
|
|
1049
|
+
mutable height?: uLongRange,
|
|
1050
|
+
mutable aspectRatio?: doubleRange,
|
|
1051
|
+
mutable frameRate?: doubleRange,
|
|
1052
|
+
mutable facingMode?: array<string>,
|
|
1053
|
+
mutable sampleRate?: uLongRange,
|
|
1054
|
+
mutable sampleSize?: uLongRange,
|
|
1055
|
+
mutable echoCancellation?: array<bool>,
|
|
1056
|
+
mutable autoGainControl?: array<bool>,
|
|
1057
|
+
mutable noiseSuppression?: array<bool>,
|
|
1058
|
+
mutable channelCount?: uLongRange,
|
|
1059
|
+
mutable deviceId?: string,
|
|
1060
|
+
mutable groupId?: string,
|
|
1061
|
+
mutable backgroundBlur?: array<bool>,
|
|
1062
|
+
mutable displaySurface?: string,
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
type mediaTrackConstraintSet = {
|
|
1066
|
+
mutable width?: int,
|
|
1067
|
+
mutable height?: int,
|
|
1068
|
+
mutable aspectRatio?: float,
|
|
1069
|
+
mutable frameRate?: float,
|
|
1070
|
+
mutable facingMode?: string,
|
|
1071
|
+
mutable sampleRate?: int,
|
|
1072
|
+
mutable sampleSize?: int,
|
|
1073
|
+
mutable echoCancellation?: bool,
|
|
1074
|
+
mutable autoGainControl?: bool,
|
|
1075
|
+
mutable noiseSuppression?: bool,
|
|
1076
|
+
mutable channelCount?: int,
|
|
1077
|
+
mutable deviceId?: string,
|
|
1078
|
+
mutable groupId?: string,
|
|
1079
|
+
mutable backgroundBlur?: bool,
|
|
1080
|
+
mutable displaySurface?: string,
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
type mediaTrackConstraints = {
|
|
1084
|
+
...mediaTrackConstraintSet,
|
|
1085
|
+
mutable advanced?: array<mediaTrackConstraintSet>,
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
type mediaTrackSettings = {
|
|
1089
|
+
mutable width?: int,
|
|
1090
|
+
mutable height?: int,
|
|
1091
|
+
mutable aspectRatio?: float,
|
|
1092
|
+
mutable frameRate?: float,
|
|
1093
|
+
mutable facingMode?: string,
|
|
1094
|
+
mutable sampleRate?: int,
|
|
1095
|
+
mutable sampleSize?: int,
|
|
1096
|
+
mutable echoCancellation?: bool,
|
|
1097
|
+
mutable autoGainControl?: bool,
|
|
1098
|
+
mutable noiseSuppression?: bool,
|
|
1099
|
+
mutable channelCount?: int,
|
|
1100
|
+
mutable deviceId?: string,
|
|
1101
|
+
mutable groupId?: string,
|
|
1102
|
+
mutable backgroundBlur?: bool,
|
|
1103
|
+
mutable displaySurface?: string,
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
type audioBufferOptions = {
|
|
1107
|
+
mutable numberOfChannels?: int,
|
|
1108
|
+
mutable length: int,
|
|
1109
|
+
mutable sampleRate: float,
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
type audioProcessingEventInit = {
|
|
1113
|
+
...eventInit,
|
|
1114
|
+
mutable playbackTime: float,
|
|
1115
|
+
mutable inputBuffer: audioBuffer,
|
|
1116
|
+
mutable outputBuffer: audioBuffer,
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
type offlineAudioCompletionEventInit = {
|
|
1120
|
+
...eventInit,
|
|
1121
|
+
mutable renderedBuffer: audioBuffer,
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
type audioNodeOptions = {
|
|
1125
|
+
mutable channelCount?: int,
|
|
1126
|
+
mutable channelCountMode?: channelCountMode,
|
|
1127
|
+
mutable channelInterpretation?: channelInterpretation,
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
type biquadFilterOptions = {
|
|
1131
|
+
...audioNodeOptions,
|
|
1132
|
+
@as("type") mutable type_?: biquadFilterType,
|
|
1133
|
+
@as("Q") mutable q?: float,
|
|
1134
|
+
mutable detune?: float,
|
|
1135
|
+
mutable frequency?: float,
|
|
1136
|
+
mutable gain?: float,
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
type audioBufferSourceOptions = {
|
|
1140
|
+
mutable buffer?: Null.t<audioBuffer>,
|
|
1141
|
+
mutable detune?: float,
|
|
1142
|
+
mutable loop?: bool,
|
|
1143
|
+
mutable loopEnd?: float,
|
|
1144
|
+
mutable loopStart?: float,
|
|
1145
|
+
mutable playbackRate?: float,
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
type channelMergerOptions = {
|
|
1149
|
+
...audioNodeOptions,
|
|
1150
|
+
mutable numberOfInputs?: int,
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
type channelSplitterOptions = {
|
|
1154
|
+
...audioNodeOptions,
|
|
1155
|
+
mutable numberOfOutputs?: int,
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
type constantSourceOptions = {mutable offset?: float}
|
|
1159
|
+
|
|
1160
|
+
type convolverOptions = {
|
|
1161
|
+
...audioNodeOptions,
|
|
1162
|
+
mutable buffer?: Null.t<audioBuffer>,
|
|
1163
|
+
mutable disableNormalization?: bool,
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
type delayOptions = {
|
|
1167
|
+
...audioNodeOptions,
|
|
1168
|
+
mutable maxDelayTime?: float,
|
|
1169
|
+
mutable delayTime?: float,
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
type dynamicsCompressorOptions = {
|
|
1173
|
+
...audioNodeOptions,
|
|
1174
|
+
mutable attack?: float,
|
|
1175
|
+
mutable knee?: float,
|
|
1176
|
+
mutable ratio?: float,
|
|
1177
|
+
mutable release?: float,
|
|
1178
|
+
mutable threshold?: float,
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
type gainOptions = {
|
|
1182
|
+
...audioNodeOptions,
|
|
1183
|
+
mutable gain?: float,
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
type iirFilterOptions = {
|
|
1187
|
+
...audioNodeOptions,
|
|
1188
|
+
mutable feedforward: array<float>,
|
|
1189
|
+
mutable feedback: array<float>,
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
type oscillatorOptions = {
|
|
1193
|
+
...audioNodeOptions,
|
|
1194
|
+
@as("type") mutable type_?: oscillatorType,
|
|
1195
|
+
mutable frequency?: float,
|
|
1196
|
+
mutable detune?: float,
|
|
1197
|
+
mutable periodicWave?: periodicWave,
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
type pannerOptions = {
|
|
1201
|
+
...audioNodeOptions,
|
|
1202
|
+
mutable panningModel?: panningModelType,
|
|
1203
|
+
mutable distanceModel?: distanceModelType,
|
|
1204
|
+
mutable positionX?: float,
|
|
1205
|
+
mutable positionY?: float,
|
|
1206
|
+
mutable positionZ?: float,
|
|
1207
|
+
mutable orientationX?: float,
|
|
1208
|
+
mutable orientationY?: float,
|
|
1209
|
+
mutable orientationZ?: float,
|
|
1210
|
+
mutable refDistance?: float,
|
|
1211
|
+
mutable maxDistance?: float,
|
|
1212
|
+
mutable rolloffFactor?: float,
|
|
1213
|
+
mutable coneInnerAngle?: float,
|
|
1214
|
+
mutable coneOuterAngle?: float,
|
|
1215
|
+
mutable coneOuterGain?: float,
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
type analyserOptions = {
|
|
1219
|
+
...audioNodeOptions,
|
|
1220
|
+
mutable fftSize?: int,
|
|
1221
|
+
mutable maxDecibels?: float,
|
|
1222
|
+
mutable minDecibels?: float,
|
|
1223
|
+
mutable smoothingTimeConstant?: float,
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
type periodicWaveOptions = {
|
|
1227
|
+
...periodicWaveConstraints,
|
|
1228
|
+
mutable real?: array<float>,
|
|
1229
|
+
mutable imag?: array<float>,
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
type stereoPannerOptions = {
|
|
1233
|
+
...audioNodeOptions,
|
|
1234
|
+
mutable pan?: float,
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
type waveShaperOptions = {
|
|
1238
|
+
...audioNodeOptions,
|
|
1239
|
+
mutable curve?: array<float>,
|
|
1240
|
+
mutable oversample?: overSampleType,
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
type audioContextOptions = {
|
|
1244
|
+
mutable latencyHint?: unknown,
|
|
1245
|
+
mutable sampleRate?: float,
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
type mediaElementAudioSourceOptions = {mutable mediaElement: htmlMediaElement}
|
|
1249
|
+
|
|
1250
|
+
type mediaStreamAudioSourceOptions = {mutable mediaStream: mediaStream}
|
|
1251
|
+
|
|
1252
|
+
type audioWorkletNodeOptions = {
|
|
1253
|
+
...audioNodeOptions,
|
|
1254
|
+
mutable numberOfInputs?: int,
|
|
1255
|
+
mutable numberOfOutputs?: int,
|
|
1256
|
+
mutable outputChannelCount?: array<int>,
|
|
1257
|
+
mutable parameterData?: any,
|
|
1258
|
+
mutable processorOptions?: Dict.t<string>,
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
type offlineAudioContextOptions = {
|
|
1262
|
+
mutable numberOfChannels?: int,
|
|
1263
|
+
mutable length: int,
|
|
1264
|
+
mutable sampleRate: float,
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
type workletOptions = {mutable credentials?: requestCredentials}
|
|
1268
|
+
|
|
1269
|
+
type decodeSuccessCallback = audioBuffer => unit
|
|
1270
|
+
|
|
1271
|
+
type decodeErrorCallback = domException => unit
|