@audio/decode-aac 1.2.0 → 1.3.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.d.ts +15 -0
- package/audio.js +10 -0
- package/package.json +10 -3
- package/src/aac.wasm.cjs +0 -0
package/audio.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated from the audio.js manifest (params metadata is the source of truth).
|
|
2
|
+
// Regenerate: node tools/dts.js in @audio/compile. Do not edit by hand.
|
|
3
|
+
|
|
4
|
+
/** Automatable number — scalar, `t => value` fn, or breakpoint curve {t, v} */
|
|
5
|
+
type Auto = number | ((t: number) => number) | { t: number[], v: number[] }
|
|
6
|
+
/** Per-block param values as delivered by hosts (numbers arrive as 1-length Float32Array) */
|
|
7
|
+
type Live = Record<string, Float32Array | string | boolean>
|
|
8
|
+
type Ctx = { sampleRate: number, maxBlockSize: number, maxChannels: number, currentTime: number, duration?: number, events?: readonly any[], emit?: (name: string, ...args: any[]) => void, [k: string]: unknown }
|
|
9
|
+
type Process = (inputs: Float32Array[][], outputs: Float32Array[][], params: Live) => void
|
|
10
|
+
|
|
11
|
+
/** Codec plugin 'aac' — extends audio()'s openable formats / save() targets */
|
|
12
|
+
export declare const aac: {
|
|
13
|
+
codec: 'aac'
|
|
14
|
+
decode(bytes: Uint8Array): { channelData: Float32Array[], sampleRate: number } | Promise<{ channelData: Float32Array[], sampleRate: number }>
|
|
15
|
+
}
|
package/audio.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// audio.js manifest — codec atom, decode half: whole-buffer bytes → { channelData,
|
|
2
|
+
// sampleRate }. Hosts merge with the encode half (@audio/encode-aac) by format
|
|
3
|
+
// name. Format detection is magic-byte (audio-type) — no test() needed here.
|
|
4
|
+
|
|
5
|
+
import decodeFn from './decode-aac.js'
|
|
6
|
+
|
|
7
|
+
export const aac = {
|
|
8
|
+
codec: 'aac',
|
|
9
|
+
decode: (bytes) => decodeFn(bytes),
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@audio/decode-aac",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Decode AAC/M4A (FAAD2 WASM) and ALAC/Apple Lossless (pure JS) to PCM samples",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "decode-aac.js",
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./decode-aac.js",
|
|
10
10
|
"./meta": "./meta.js",
|
|
11
|
+
"./audio": {
|
|
12
|
+
"types": "./audio.d.ts",
|
|
13
|
+
"default": "./audio.js"
|
|
14
|
+
},
|
|
11
15
|
"./package.json": "./package.json"
|
|
12
16
|
},
|
|
13
17
|
"publishConfig": {
|
|
@@ -24,7 +28,9 @@
|
|
|
24
28
|
"meta.js",
|
|
25
29
|
"decode-aac.d.ts",
|
|
26
30
|
"src/aac.wasm.cjs",
|
|
27
|
-
"LICENSE"
|
|
31
|
+
"LICENSE",
|
|
32
|
+
"audio.js",
|
|
33
|
+
"audio.d.ts"
|
|
28
34
|
],
|
|
29
35
|
"keywords": [
|
|
30
36
|
"aac",
|
|
@@ -49,5 +55,6 @@
|
|
|
49
55
|
},
|
|
50
56
|
"engines": {
|
|
51
57
|
"node": ">=16"
|
|
52
|
-
}
|
|
58
|
+
},
|
|
59
|
+
"audio": "./audio.js"
|
|
53
60
|
}
|
package/src/aac.wasm.cjs
CHANGED
|
Binary file
|