@audio/decode-caf 1.2.0 → 1.3.0

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/audio.js +10 -0
  3. package/package.json +6 -3
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Decode Core Audio Format (CAF) audio to PCM float samples.
4
4
 
5
- Part of [audio-decode](https://github.com/audiojs/audio-decode).
5
+ Part of [decode](https://github.com/audiojs/decode).
6
6
 
7
7
  ## Install
8
8
 
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-caf) by format
3
+ // name. Format detection is magic-byte (audio-type) — no test() needed here.
4
+
5
+ import decodeFn from './decode-caf.js'
6
+
7
+ export const caf = {
8
+ codec: 'caf',
9
+ decode: (bytes) => decodeFn(bytes),
10
+ }
package/package.json CHANGED
@@ -1,18 +1,20 @@
1
1
  {
2
2
  "name": "@audio/decode-caf",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Decode CAF (Core Audio Format) audio to PCM samples",
5
5
  "type": "module",
6
6
  "main": "decode-caf.js",
7
7
  "types": "decode-caf.d.ts",
8
8
  "exports": {
9
9
  ".": "./decode-caf.js",
10
+ "./audio": "./audio.js",
10
11
  "./package.json": "./package.json"
11
12
  },
12
13
  "files": [
13
14
  "decode-caf.js",
14
15
  "decode-caf.d.ts",
15
- "LICENSE"
16
+ "LICENSE",
17
+ "audio.js"
16
18
  ],
17
19
  "scripts": {
18
20
  "test": "node test.js"
@@ -39,5 +41,6 @@
39
41
  "engines": {
40
42
  "node": ">=16"
41
43
  },
42
- "bugs": "https://github.com/audiojs/decode-caf/issues"
44
+ "bugs": "https://github.com/audiojs/decode-caf/issues",
45
+ "audio": "./audio.js"
43
46
  }