@audio/decode 4.0.0 → 4.1.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/audio-decode.js +5 -3
- package/package.json +3 -1
- package/readme.md +2 -1
- package/test.html +2 -1
package/audio-decode.js
CHANGED
|
@@ -124,8 +124,8 @@ function fmt(name, init) {
|
|
|
124
124
|
|
|
125
125
|
// --- codecs ---
|
|
126
126
|
// dedupe (3rd arg): decoder upmixes mono sources to duplicate stereo (verified for mp3;
|
|
127
|
-
// aac
|
|
128
|
-
// video containers that may carry AAC or MP3 (mp4/mov, mkv, avi) do.
|
|
127
|
+
// aac flagged conservatively). Exact containers never dedupe, nor WMA (libavcodec keeps the
|
|
128
|
+
// declared width); video containers that may carry AAC or MP3 (mp4/mov, mkv, avi) do.
|
|
129
129
|
|
|
130
130
|
reg('mp3', () => import('@audio/decode-mp3'), true)
|
|
131
131
|
reg('flac', () => import('@audio/decode-flac'))
|
|
@@ -148,7 +148,9 @@ reg('avi', () => import('@audio/decode-avi'), true)
|
|
|
148
148
|
reg('ac3', () => import('@audio/decode-ac3'))
|
|
149
149
|
reg('dts', () => import('@audio/decode-dts'))
|
|
150
150
|
reg('amr', () => import('@audio/decode-amr'))
|
|
151
|
-
|
|
151
|
+
// raw frames, no signature: by name only (decode.gsm(), decode(src, 'gsm'))
|
|
152
|
+
reg('gsm', () => import('@audio/decode-gsm'))
|
|
153
|
+
reg('wma', () => import('@audio/decode-wma'))
|
|
152
154
|
|
|
153
155
|
// lossless / audiophile long tail
|
|
154
156
|
reg('wv', () => import('@audio/decode-wavpack'))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@audio/decode",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "Decode audio data in node or browser",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"@audio/decode-ac3": "^1.0.0",
|
|
33
33
|
"@audio/decode-aiff": "^1.3.0",
|
|
34
34
|
"@audio/decode-amr": "^1.3.0",
|
|
35
|
+
"@audio/decode-gsm": "^0.1.0",
|
|
35
36
|
"@audio/decode-avi": "^1.1.0",
|
|
36
37
|
"@audio/decode-caf": "^1.4.1",
|
|
37
38
|
"@audio/decode-dts": "^1.0.0",
|
|
@@ -86,6 +87,7 @@
|
|
|
86
87
|
"caf",
|
|
87
88
|
"webm",
|
|
88
89
|
"amr",
|
|
90
|
+
"gsm",
|
|
89
91
|
"wma",
|
|
90
92
|
"pcm",
|
|
91
93
|
"streaming",
|
package/readme.md
CHANGED
|
@@ -35,6 +35,7 @@ const { channelData, sampleRate } = await decode(anyAudioBuffer);
|
|
|
35
35
|
| E-AC-3 (Dolby Digital Plus, + AC-3) | [@audio/decode-eac3](./packages/decode-eac3) | 432 KB | WASM (FFmpeg libavcodec, LGPL) |
|
|
36
36
|
| APE (Monkey's Audio) | [@audio/decode-ape](./packages/decode-ape) | 262 KB | WASM (FFmpeg libavcodec, LGPL) |
|
|
37
37
|
| AMR | [@audio/decode-amr](./packages/decode-amr) | 241 KB | WASM |
|
|
38
|
+
| GSM 06.10 (raw frames, by name) | [@audio/decode-gsm](./packages/decode-gsm) | 23 KB | WASM (libgsm) |
|
|
38
39
|
| WMA (v1, v2, Pro, Lossless) | [@audio/decode-wma](./packages/decode-wma) | 463 KB | WASM (FFmpeg libavcodec, LGPL) |
|
|
39
40
|
| WavPack | [@audio/decode-wavpack](./packages/decode-wavpack) | 51 KB | WASM |
|
|
40
41
|
| TTA (True Audio) | [@audio/decode-tta](./packages/decode-tta) | 11 KB | JS |
|
|
@@ -76,7 +77,7 @@ for await (let { channelData, sampleRate } of decode.mp3(response.body)) {
|
|
|
76
77
|
|
|
77
78
|
Works with `ReadableStream`, `fetch` body, Node stream, or any async iterable.
|
|
78
79
|
|
|
79
|
-
Formats: `mp3`, `flac`, `opus`, `oga`, `m4a`, `mp4`, `mov`, `wav`, `qoa`, `aac`, `aiff`, `caf`, `webm`, `mkv`, `avi`, `ac3`, `dts`, `amr`, `wma`, `eac3`, `ape`, `wv`, `tta`, `mpc`, `dsf`, `dff`, `mod`, `xm`, `s3m`, `it`.
|
|
80
|
+
Formats: `mp3`, `flac`, `opus`, `oga`, `m4a`, `mp4`, `mov`, `wav`, `qoa`, `aac`, `aiff`, `caf`, `webm`, `mkv`, `avi`, `ac3`, `dts`, `amr`, `gsm`, `wma`, `eac3`, `ape`, `wv`, `tta`, `mpc`, `dsf`, `dff`, `mod`, `xm`, `s3m`, `it`.
|
|
80
81
|
|
|
81
82
|
### Video files
|
|
82
83
|
|
package/test.html
CHANGED
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
"@audio/decode-dsd": "./packages/decode-dsd/decode-dsd.js",
|
|
46
46
|
"@audio/decode-mod": "./packages/decode-mod/decode-mod.js",
|
|
47
47
|
"@audio/decode-amr": "./packages/decode-amr/decode-amr.js",
|
|
48
|
-
"@audio/decode-wma": "./packages/decode-wma/decode-wma.js"
|
|
48
|
+
"@audio/decode-wma": "./packages/decode-wma/decode-wma.js",
|
|
49
|
+
"@audio/decode-gsm": "./packages/decode-gsm/decode-gsm.js"
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
</script>
|