node-web-audio-api 1.0.0-beta.0 → 1.0.1
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 +11 -2
- package/README.md +24 -12
- package/js/AudioWorklet.js +1 -1
- package/js/AudioWorkletGlobalScope.js +1 -1
- package/js/AudioWorkletNode.js +0 -3
- 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 +11 -14
- package/.eslintrc +0 -3
- package/Cross.toml +0 -17
- package/all-checks.sh +0 -18
- package/run-wpt.sh +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## v1.0.1 (17/01/2025)
|
|
4
|
+
|
|
5
|
+
- Update upstream crate to [v1.2.0](https://github.com/orottier/web-audio-api-rs/blob/main/CHANGELOG.md#version-120-2025-01-16)
|
|
6
|
+
|
|
7
|
+
## v1.0.0 (11/01/2025)
|
|
8
|
+
|
|
9
|
+
- Align version with upstream crate
|
|
10
|
+
- Refactor CI
|
|
11
|
+
|
|
3
12
|
## v0.21.5 (23/12/2024)
|
|
4
13
|
|
|
5
14
|
- Fix: Use module import for `AudioWorklet#addModule`
|
|
@@ -57,7 +66,7 @@
|
|
|
57
66
|
|
|
58
67
|
- Update upstream create to [v0.42.0](https://github.com/orottier/web-audio-api-rs/blob/main/CHANGELOG.md#version-0420-2024-02-05)
|
|
59
68
|
- Improve Error handling
|
|
60
|
-
- Add
|
|
69
|
+
- Add channelCount to media constraints
|
|
61
70
|
|
|
62
71
|
## v0.15.0 (16/01/2024)
|
|
63
72
|
|
|
@@ -97,7 +106,7 @@
|
|
|
97
106
|
|
|
98
107
|
## v0.8.0 (19/05/2023)
|
|
99
108
|
|
|
100
|
-
- Implement MediaDevices
|
|
109
|
+
- Implement MediaDevices enumerateDevices and getUserMedia
|
|
101
110
|
- Use jack as default output if exists on linux
|
|
102
111
|
|
|
103
112
|
## v0.7.0 (23/02/2023)
|
package/README.md
CHANGED
|
@@ -60,24 +60,36 @@ npm run build
|
|
|
60
60
|
|
|
61
61
|
3. Run the examples from the project's root directory
|
|
62
62
|
```sh
|
|
63
|
-
node examples/granular-scrub.
|
|
63
|
+
node examples/granular-scrub.js
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## Caveats
|
|
67
67
|
|
|
68
|
+
- `AudioBuffer#getChannelData` is implemented but not reliable in some situations. Your should prefer `AudioBuffer#copyToChannel` and `AudioBuffer#copyFromChannel` when you want to access or manipulate the underlying samples in a safe way.
|
|
68
69
|
- `Streams`: only a minimal audio input stream and the `MediaStreamSourceNode` are provided. All other `MediaStream` features are left on the side for now as they principally concern a different API specification, which is not a trivial problem.
|
|
69
70
|
|
|
70
|
-
## Supported Platforms
|
|
71
|
+
## Supported Platforms - Prebuilt Binaries
|
|
72
|
+
|
|
73
|
+
We provide prebuilt binaries for the following platforms:
|
|
74
|
+
|
|
75
|
+
| | binaries |
|
|
76
|
+
|-----------------------------------------------------|:--------:|
|
|
77
|
+
| Windows x64 | ✓ |
|
|
78
|
+
| Windows arm64 | ✓ |
|
|
79
|
+
| macOS x64 | ✓ |
|
|
80
|
+
| macOS aarch64 | ✓ |
|
|
81
|
+
| Linux x64 gnu (jack / pipewire-jack) | ✓ |
|
|
82
|
+
| Linux arm gnueabihf (jack / pipewire-jack) | ✓ |
|
|
83
|
+
| Linux arm64 gnu (jack / pipewire-jack) | ✓ |
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Important notes
|
|
88
|
+
|
|
89
|
+
- If you need support for another platform, please fill an [issue](https://github.com/ircam-ismm/node-web-audio-api/issues) and we will see what we can do.
|
|
90
|
+
|
|
91
|
+
- All provided Linux binaries are built with the `jack` flag, which should work either with properly configured [Jack](https://jackaudio.org/) or [pipewire-jack](https://pipewire.org/) backends. If this is a limitation for you, please fill an [issue](https://github.com/ircam-ismm/node-web-audio-api/issues) and we will see what we can do.
|
|
71
92
|
|
|
72
|
-
| | binaries | tested |
|
|
73
|
-
| --------------------------- | ------ | ------ |
|
|
74
|
-
| Windows x64 | ✓ | |
|
|
75
|
-
| Windows arm64 | ✓ | |
|
|
76
|
-
| macOS x64 | ✓ | ✓ |
|
|
77
|
-
| macOS aarch64 | ✓ | ✓ |
|
|
78
|
-
| Linux x64 gnu | ✓ | |
|
|
79
|
-
| Linux arm gnueabihf (RPi) | ✓ | ✓ |
|
|
80
|
-
| Linux arm64 gnu (RPi) | ✓ | ✓ |
|
|
81
93
|
|
|
82
94
|
## Manual Build
|
|
83
95
|
|
|
@@ -161,7 +173,7 @@ Then run:
|
|
|
161
173
|
npm run wpt # build in debug mode and run all wpt test
|
|
162
174
|
npm run wpt:only # run all wpt test without build
|
|
163
175
|
npm run wpt -- --list # list all wpt test files
|
|
164
|
-
npm run wpt -- --filter <string> # apply <string> filter on executed/listed wpt tests
|
|
176
|
+
npm run wpt -- --filter <string> # apply <string> filter on executed/listed wpt tests
|
|
165
177
|
```
|
|
166
178
|
|
|
167
179
|
## License
|
package/js/AudioWorklet.js
CHANGED
|
@@ -85,7 +85,7 @@ const resolveModule = async (moduleUrl) => {
|
|
|
85
85
|
try {
|
|
86
86
|
// try resolve according to process.cwd()
|
|
87
87
|
absPathname = require.resolve(moduleUrl, { paths: [process.cwd()] });
|
|
88
|
-
} catch
|
|
88
|
+
} catch {
|
|
89
89
|
throw new DOMException(`Failed to execute 'addModule' on 'AudioWorklet': Cannot resolve module ${moduleUrl}`, 'AbortError');
|
|
90
90
|
}
|
|
91
91
|
}
|
package/js/AudioWorkletNode.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-unused-vars */
|
|
2
1
|
const conversions = require('webidl-conversions');
|
|
3
2
|
const {
|
|
4
3
|
toSanitizedSequence,
|
|
@@ -23,8 +22,6 @@ const {
|
|
|
23
22
|
ErrorEvent,
|
|
24
23
|
} = require('./Events.js');
|
|
25
24
|
|
|
26
|
-
/* eslint-enable no-unused-vars */
|
|
27
|
-
|
|
28
25
|
const AudioNode = require('./AudioNode.js');
|
|
29
26
|
const AudioParamMap = require('./AudioParamMap.js');
|
|
30
27
|
const IMPLEMENTATION_MAX_NUMBER_OF_CHANNELS = 32;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-web-audio-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"author": "Benjamin Matuszewski",
|
|
5
5
|
"description": "Web Audio API implementation for Node.js",
|
|
6
6
|
"exports": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"build:only": "cargo build --release && node ./.scripts/move-artifact.mjs --release",
|
|
42
42
|
"check": "cargo fmt && cargo clippy",
|
|
43
43
|
"generate": "node generator/index.mjs && cargo fmt",
|
|
44
|
-
"lint": "npx eslint index.cjs index.mjs && npx eslint js/*.js && npx eslint examples/*.
|
|
44
|
+
"lint": "npx eslint index.cjs index.mjs && npx eslint js/*.js && npx eslint examples/*.js",
|
|
45
45
|
"preversion": "npm install && npm run generate",
|
|
46
46
|
"postversion": "cargo bump $npm_package_version && git commit -am \"v$npm_package_version\" && node .scripts/check-changelog.mjs",
|
|
47
47
|
"test": "mocha tests/*.spec.mjs",
|
|
@@ -51,23 +51,20 @@
|
|
|
51
51
|
"wpt:only": "node ./.scripts/wpt-harness.mjs"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@ircam/eslint-config": "^
|
|
55
|
-
"@ircam/sc-
|
|
56
|
-
"@ircam/sc-
|
|
57
|
-
"@ircam/sc-utils": "^1.3.3",
|
|
54
|
+
"@ircam/eslint-config": "^2.0.0",
|
|
55
|
+
"@ircam/sc-scheduling": "^1.0.0",
|
|
56
|
+
"@ircam/sc-utils": "^1.9.0",
|
|
58
57
|
"@sindresorhus/slugify": "^2.1.1",
|
|
59
|
-
"camelcase": "^
|
|
60
|
-
"chai": "^
|
|
58
|
+
"camelcase": "^8.0.0",
|
|
59
|
+
"chai": "^5.1.2",
|
|
61
60
|
"chalk": "^5.3.0",
|
|
62
61
|
"cli-table": "^0.3.11",
|
|
63
|
-
"commander": "^
|
|
62
|
+
"commander": "^13.0.0",
|
|
64
63
|
"dotenv": "^16.0.3",
|
|
65
|
-
"eslint": "^
|
|
64
|
+
"eslint": "^9.18.0",
|
|
66
65
|
"js-beautify": "^1.15.1",
|
|
67
|
-
"mocha": "^
|
|
68
|
-
"
|
|
69
|
-
"octokit": "^2.0.11",
|
|
70
|
-
"ping": "^0.4.2",
|
|
66
|
+
"mocha": "^11.0.1",
|
|
67
|
+
"octokit": "^4.1.0",
|
|
71
68
|
"template-literal": "^1.0.4",
|
|
72
69
|
"webidl2": "^24.2.0",
|
|
73
70
|
"wpt-runner": "^5.0.0"
|
package/.eslintrc
DELETED
package/Cross.toml
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
[target.aarch64-unknown-linux-gnu]
|
|
2
|
-
pre-build = [
|
|
3
|
-
"dpkg --add-architecture $CROSS_DEB_ARCH",
|
|
4
|
-
"apt-get update && apt-get --assume-yes install libasound2-dev:$CROSS_DEB_ARCH libjack-jackd2-dev:$CROSS_DEB_ARCH"
|
|
5
|
-
]
|
|
6
|
-
|
|
7
|
-
[target.armv7-unknown-linux-gnueabihf]
|
|
8
|
-
pre-build = [
|
|
9
|
-
"dpkg --add-architecture $CROSS_DEB_ARCH",
|
|
10
|
-
"apt-get update && apt-get --assume-yes install libasound2-dev:$CROSS_DEB_ARCH libjack-jackd2-dev:$CROSS_DEB_ARCH"
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
[target.x86_64-unknown-linux-gnu]
|
|
14
|
-
pre-build = [
|
|
15
|
-
"dpkg --add-architecture $CROSS_DEB_ARCH",
|
|
16
|
-
"apt-get update && apt-get --assume-yes install libasound2-dev:$CROSS_DEB_ARCH libjack-jackd2-dev:$CROSS_DEB_ARCH"
|
|
17
|
-
]
|
package/all-checks.sh
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
echo "-----------------------------------------------"
|
|
5
|
-
echo "> cargo fmt -- --check --color always"
|
|
6
|
-
echo "-----------------------------------------------"
|
|
7
|
-
cargo fmt -- --check --color always
|
|
8
|
-
|
|
9
|
-
echo "-----------------------------------------------"
|
|
10
|
-
echo "> cargo clippy --all-targets -- -D warnings"
|
|
11
|
-
echo "-----------------------------------------------"
|
|
12
|
-
cargo clippy --all-targets -- -D warnings
|
|
13
|
-
|
|
14
|
-
echo "-----------------------------------------------"
|
|
15
|
-
echo "> Run js tests"
|
|
16
|
-
echo "-----------------------------------------------"
|
|
17
|
-
npm run test
|
|
18
|
-
|