{"_id":"@audio/aac-decode","_rev":"3-79271faadccb6e85abe4cf12293403e8","name":"@audio/aac-decode","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"@audio/aac-decode","version":"1.0.1","keywords":["aac","m4a","mp4","audio","decode","decoder","wasm","faad2"],"author":{"name":"audiojs"},"license":"GPL-2.0","_id":"@audio/aac-decode@1.0.1","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"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":"0395c221fdfac6c55c84f7d844bd80845cd7313e","tarball":"https://registry.npmjs.org/@audio/aac-decode/-/aac-decode-1.0.1.tgz","fileCount":6,"integrity":"sha512-EQWks5e9cZi12EMdaFxcUDgzXHglGcSNv+gDwfPfSjv/bfTT5tOhs+zAAfjABnVd49Zgio5WMB4yi3nItxEVog==","signatures":[{"sig":"MEUCIAYmAJwcYAo6mXGuPO1gCZB/Eq28bzXgt8DIOoynYQdlAiEAl/6dAKx2iuhJZkiTuaYEAaGfyhOqGZPd8bXzdpOJKro=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":375961},"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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aac-decode_1.0.1_1773590994434_0.8289157594829375","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.2":{"name":"@audio/aac-decode","version":"1.0.2","keywords":["aac","m4a","mp4","audio","decode","decoder","wasm","faad2"],"author":{"name":"audiojs"},"license":"GPL-2.0","_id":"@audio/aac-decode@1.0.2","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"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":"c5ae19d423adb6817c24b7b4d1aad559f446a920","tarball":"https://registry.npmjs.org/@audio/aac-decode/-/aac-decode-1.0.2.tgz","fileCount":6,"integrity":"sha512-uRt4BFvAv9KFKfR8HkBWOfw54CFGRJH8GCTCsYXRwG2WpELjyfovYdKuhTxCe7qxu4ideb8vOYTZgfn/mZm/4A==","signatures":[{"sig":"MEUCIQDNlBDwwJc24Wfw1yWfEdyY4bm5dV9uWKEMFxZAP3Y4TAIgbfivJIu1BV3B5HQrabRZjE3Tg9RTLwRbnOYWJezguzA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":376700},"main":"aac-decode.js","type":"module","types":"aac-decode.d.ts","engines":{"node":">=16"},"exports":{".":"./aac-decode.js","./package.json":"./package.json"},"gitHead":"4e0b4063504786e16fc38a219e122d491c52e77e","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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aac-decode_1.0.2_1773696505893_0.8790834959954235","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2026-03-15T16:09:54.355Z","modified":"2026-04-04T03:29:58.418Z","1.0.1":"2026-03-15T16:09:54.605Z","1.0.2":"2026-03-16T21:28:26.057Z"},"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":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"},{"name":"jamen","email":"jamenmarz@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 @audio/aac-decode\n```\n\n## Usage\n\n```js\nimport decode from '@audio/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 '@audio/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"}