node-web-audio-api 1.0.2 → 1.0.4
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/CHANGELOG.md +8 -0
- package/README.md +2 -0
- package/index.d.ts +40 -21
- package/js/AudioWorkletNode.js +1 -1
- package/node-web-audio-api.darwin-arm64.node +0 -0
- package/node-web-audio-api.darwin-x64.node +0 -0
- package/node-web-audio-api.linux-arm-gnueabihf.node +0 -0
- package/node-web-audio-api.linux-arm64-gnu.node +0 -0
- package/node-web-audio-api.linux-x64-gnu.node +0 -0
- package/node-web-audio-api.win32-arm64-msvc.node +0 -0
- package/node-web-audio-api.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -9,6 +9,8 @@ This library aims to provide an implementation that is both efficient and compli
|
|
|
9
9
|
- see [`orottier/web-audio-api-rs`](https://github.com/orottier/web-audio-api-rs/) for the "real" audio guts
|
|
10
10
|
- use [`napi-rs`](https://github.com/napi-rs/napi-rs/) for the Node.js bindings
|
|
11
11
|
|
|
12
|
+
For library authors who want to write components that run both in Node.js and the browser, we also provide [isomorphic-web-audio-api](https://github.com/ircam-ismm/isomorphic-web-audio-api)
|
|
13
|
+
|
|
12
14
|
## Install
|
|
13
15
|
|
|
14
16
|
```
|
package/index.d.ts
CHANGED
|
@@ -1,25 +1,44 @@
|
|
|
1
1
|
// Referencing the default lib web api typings
|
|
2
2
|
/// <reference lib="dom" />
|
|
3
|
-
|
|
4
3
|
declare module "node-web-audio-api" {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
4
|
+
export import OfflineAudioCompletionEvent = globalThis.OfflineAudioCompletionEvent;
|
|
5
|
+
export import AudioProcessingEvent = globalThis.AudioProcessingEvent;
|
|
6
|
+
// not implemented in browsers yet
|
|
7
|
+
// export import AudioRenderCapacityEvent = globalThis.AudioRenderCapacityEvent;
|
|
8
|
+
|
|
9
|
+
export import BaseAudioContext = globalThis.BaseAudioContext;
|
|
10
|
+
export import AudioContext = globalThis.AudioContext;
|
|
11
|
+
export import OfflineAudioContext = globalThis.OfflineAudioContext;
|
|
12
|
+
|
|
13
|
+
export import AudioNode = globalThis.AudioNode;
|
|
14
|
+
export import AudioScheduledSourceNode = globalThis.AudioScheduledSourceNode;
|
|
15
|
+
export import AudioParam = globalThis.AudioParam;
|
|
16
|
+
export import AudioDestinationNode = globalThis.AudioDestinationNode;
|
|
17
|
+
export import AudioListener = globalThis.AudioListener;
|
|
18
|
+
export import AudioWorklet = globalThis.AudioWorklet;
|
|
19
|
+
export import AudioParamMap = globalThis.AudioParamMap;
|
|
20
|
+
// not implemented in browsers yet
|
|
21
|
+
// export import AudioRenderCapacity = globalThis.AudioRenderCapacity;
|
|
22
|
+
|
|
23
|
+
export import PeriodicWave = globalThis.PeriodicWave;
|
|
24
|
+
export import AudioBuffer = globalThis.AudioBuffer;
|
|
25
|
+
|
|
26
|
+
export import ScriptProcessorNode = globalThis.ScriptProcessorNode;
|
|
27
|
+
export import AudioWorkletNode = globalThis.AudioWorkletNode;
|
|
28
|
+
export import AnalyserNode = globalThis.AnalyserNode;
|
|
29
|
+
export import AudioBufferSourceNode = globalThis.AudioBufferSourceNode;
|
|
30
|
+
export import BiquadFilterNode = globalThis.BiquadFilterNode;
|
|
31
|
+
export import ChannelMergerNode = globalThis.ChannelMergerNode;
|
|
32
|
+
export import ChannelSplitterNode = globalThis.ChannelSplitterNode;
|
|
33
|
+
export import ConstantSourceNode = globalThis.ConstantSourceNode;
|
|
34
|
+
export import ConvolverNode = globalThis.ConvolverNode;
|
|
35
|
+
export import DelayNode = globalThis.DelayNode;
|
|
36
|
+
export import DynamicsCompressorNode = globalThis.DynamicsCompressorNode;
|
|
37
|
+
export import GainNode = globalThis.GainNode;
|
|
38
|
+
export import IIRFilterNode = globalThis.IIRFilterNode;
|
|
39
|
+
export import MediaStreamAudioSourceNode = globalThis.MediaStreamAudioSourceNode;
|
|
40
|
+
export import OscillatorNode = globalThis.OscillatorNode;
|
|
41
|
+
export import PannerNode = globalThis.PannerNode;
|
|
42
|
+
export import StereoPannerNode = globalThis.StereoPannerNode;
|
|
43
|
+
export import WaveShaperNode = globalThis.WaveShaperNode;
|
|
25
44
|
}
|
package/js/AudioWorkletNode.js
CHANGED
|
@@ -114,7 +114,7 @@ module.exports = (jsExport, nativeBinding) => {
|
|
|
114
114
|
if (typeof options.parameterData === 'object' && options.parameterData !== null) {
|
|
115
115
|
parsedOptions.parameterData = {};
|
|
116
116
|
|
|
117
|
-
for (let [key, value]
|
|
117
|
+
for (let [key, value] of Object.entries(options.parameterData)) {
|
|
118
118
|
const parsedKey = conversions['DOMString'](key, {
|
|
119
119
|
context: `Failed to construct 'AudioWorkletNode': Invalid 'parameterData' property from AudioWorkletNodeOptions: Invalid key (${key})`,
|
|
120
120
|
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|