{"_id":"aac-decode","_rev":"3-cf4cf67597986107454f12ca604eed93","name":"aac-decode","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"aac-decode","version":"1.0.0","keywords":["aac","m4a","mp4","audio","decode","decoder","wasm","faad2"],"author":{"name":"audiojs"},"license":"GPL-2.0","_id":"aac-decode@1.0.0","maintainers":[{"name":"dy","email":"df.creative@gmail.com"}],"homepage":"https://github.com/audiojs/aac-decode#readme","bugs":{"url":"https://github.com/audiojs/aac-decode/issues"},"dist":{"shasum":"75610d6f046d94b7237887516daa5dc8d1e391eb","tarball":"https://registry.npmjs.org/aac-decode/-/aac-decode-1.0.0.tgz","fileCount":6,"integrity":"sha512-YhaJyV5gv/p50aOBJHEZSbFkHnReZWxKssZ+VEuOJP67Wq6WzH/UnV9noKzB5+97QH+S1R1YImpnqVA/bYOJFA==","signatures":[{"sig":"MEUCIGez9JbTfJ3J2zftLahiM+ErOzzUGGq/I1NagFTxUx+pAiEAyycEqbKVQCs37/afjeJS4KafVtGLrgd5OlAjmjAJ0Z4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":375839},"main":"aac-decode.js","type":"module","types":"aac-decode.d.ts","engines":{"node":">=16"},"exports":{".":"./aac-decode.js","./package.json":"./package.json"},"gitHead":"b6f9778c54535f4b2fac9b82be19855d60476794","scripts":{"test":"node test.js","build":"bash build.sh","prepack":"npm run build"},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/aac-decode.git","type":"git"},"_npmVersion":"11.11.0","description":"Decode AAC/M4A audio via FAAD2 WASM","directories":{},"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aac-decode_1.0.0_1773508314837_0.8472243837167381","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Moved to @audio/aac-decode"},"1.0.1":{"name":"aac-decode","version":"1.0.1","keywords":["aac","m4a","mp4","audio","decode","decoder","wasm","faad2"],"author":{"name":"audiojs"},"license":"GPL-2.0","_id":"aac-decode@1.0.1","maintainers":[{"name":"dy","email":"df.creative@gmail.com"}],"homepage":"https://github.com/audiojs/aac-decode#readme","bugs":{"url":"https://github.com/audiojs/aac-decode/issues"},"dist":{"shasum":"1d7ed03c43ee8b7c7eeeafc7e80fec166c931cac","tarball":"https://registry.npmjs.org/aac-decode/-/aac-decode-1.0.1.tgz","fileCount":6,"integrity":"sha512-9r2b9c80bJxNpWlIJRpUxzm/mhAJX4cbgjYc5esLDgyS3CJi+qVvoCj7dWeUN0FNDspnLx/+m4z4Ep24/XeaIg==","signatures":[{"sig":"MEUCIAR5QkuJk15qYFc787MnHpmLHttkp2EXTFyMe5ZbmCGkAiEAkcaUwqFG/4j6P8NAcuN66+iQw8/qiie4vjlgvMJYbW4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":375905},"main":"aac-decode.js","type":"module","types":"aac-decode.d.ts","engines":{"node":">=16"},"exports":{".":"./aac-decode.js","./package.json":"./package.json"},"gitHead":"0cfc131b90b2737b43dc255a5625a31508bd88a5","scripts":{"test":"node test.js","build":"bash build.sh","prepack":"npm run build"},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/aac-decode.git","type":"git"},"_npmVersion":"11.11.0","description":"Decode AAC/M4A audio via FAAD2 WASM","directories":{},"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aac-decode_1.0.1_1773512931134_0.7397150030420387","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Moved to @audio/aac-decode"}},"time":{"created":"2026-03-14T17:11:54.837Z","modified":"2026-03-15T16:10:24.127Z","1.0.0":"2026-03-14T17:11:54.985Z","1.0.1":"2026-03-14T18:28:51.390Z"},"bugs":{"url":"https://github.com/audiojs/aac-decode/issues"},"author":{"name":"audiojs"},"license":"GPL-2.0","homepage":"https://github.com/audiojs/aac-decode#readme","keywords":["aac","m4a","mp4","audio","decode","decoder","wasm","faad2"],"repository":{"url":"git+https://github.com/audiojs/aac-decode.git","type":"git"},"description":"Decode AAC/M4A audio via FAAD2 WASM","maintainers":[{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# aac-decode\n\nDecode AAC/M4A audio to PCM float samples. FAAD2 compiled to WASM — works in Node.js and browsers, no native dependencies.\n\n## Install\n\n```\nnpm i aac-decode\n```\n\n## Usage\n\n```js\nimport decode from 'aac-decode'\n\n// M4A or raw ADTS — auto-detected\nlet { channelData, sampleRate } = await decode(uint8array)\n// channelData: Float32Array[] (one per channel)\n// sampleRate: number\n```\n\n### Streaming\n\n```js\nimport { decoder } from 'aac-decode'\n\nlet dec = await decoder()\nlet { channelData, sampleRate } = dec.decode(chunk)\ndec.free()\n```\n\n## API\n\n### `decode(src: Uint8Array | ArrayBuffer): Promise<AudioData>`\n\nWhole-file decode. Auto-detects M4A (MP4 container) vs raw ADTS.\n\n### `decoder(): Promise<AACDecoder>`\n\nCreates a decoder instance for manual control.\n\n- **`dec.decode(data)`** — decode chunk, returns `{ channelData, sampleRate }`\n- **`dec.flush()`** — flush remaining (returns empty for AAC)\n- **`dec.free()`** — release WASM memory\n\n### `AudioData`\n\n```ts\n{ channelData: Float32Array[], sampleRate: number }\n```\n\n## Formats\n\n- M4A / MP4 with AAC audio\n- Raw ADTS streams (.aac)\n- LC, HE-AAC v1/v2 (SBR, PS)\n\n## License\n\nGPL-2.0 (FAAD2) — [krishnized](https://github.com/krishnized/license)\n","readmeFilename":"README.md"}