{"_id":"@audio/caf-decode","_rev":"2-599c8f35b6faeba5020ab6558f49e150","name":"@audio/caf-decode","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@audio/caf-decode","version":"1.0.0","keywords":["caf","core-audio","apple","audio","decode","decoder","pcm"],"author":{"name":"audiojs"},"license":"MIT","_id":"@audio/caf-decode@1.0.0","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/caf-decode#readme","bugs":{"url":"https://github.com/audiojs/caf-decode/issues"},"dist":{"shasum":"e26b8370075498eb493e6a4edbab612d9fa8896d","tarball":"https://registry.npmjs.org/@audio/caf-decode/-/caf-decode-1.0.0.tgz","fileCount":5,"integrity":"sha512-CwvgCA+rm3rI5e811R5cBjl1DYB4+6BiNNUucwWrU2XSX3eiP+H2Tfn5CsBc/IE8+OXzbzkV8YoDuyX9+3UDyQ==","signatures":[{"sig":"MEYCIQDFd2F+yExE2+49nlhp4GJl35GKvy1CSRsHsqggUnkeGgIhAJqzrvc0dpPozQWRBbgsKyjz4ES7eZ+tJDP2Nx6pnsZN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9627},"main":"caf-decode.js","type":"module","types":"caf-decode.d.ts","engines":{"node":">=16"},"exports":{".":"./caf-decode.js","./package.json":"./package.json"},"gitHead":"f7b3defd2fe6e3eb8b1ecd0b17219bc5f6f0f5b5","scripts":{"test":"node test.js"},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/caf-decode.git","type":"git"},"_npmVersion":"11.11.0","description":"Decode CAF (Core Audio Format) audio to PCM samples","directories":{},"_nodeVersion":"25.8.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/caf-decode_1.0.0_1773602810023_0.44001264002066454","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-15T19:26:49.872Z","modified":"2026-04-04T03:30:31.123Z","1.0.0":"2026-03-15T19:26:50.153Z"},"bugs":{"url":"https://github.com/audiojs/caf-decode/issues"},"author":{"name":"audiojs"},"license":"MIT","homepage":"https://github.com/audiojs/caf-decode#readme","keywords":["caf","core-audio","apple","audio","decode","decoder","pcm"],"repository":{"url":"git+https://github.com/audiojs/caf-decode.git","type":"git"},"description":"Decode CAF (Core Audio Format) audio to PCM samples","maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"},{"name":"jamen","email":"jamenmarz@gmail.com"}],"readme":"# caf-decode\n\nDecode Core Audio Format (CAF) audio to PCM float samples.\n\nPart of [audio-decode](https://github.com/audiojs/audio-decode).\n\n## Install\n\n```\nnpm i @audio/caf-decode\n```\n\n## Usage\n\n```js\nimport decode from '@audio/caf-decode'\n\nlet { channelData, sampleRate } = await decode(cafBuffer)\n```\n\n### Streaming\n\n```js\nimport { decoder } from '@audio/caf-decode'\n\nlet dec = await decoder()\nlet result = dec.decode(chunk)\ndec.free()\n```\n\n## API\n\n### `decode(src): Promise<AudioData>`\n\nWhole-file decode. Accepts `Uint8Array` or `ArrayBuffer`.\n\n### `decoder(): Promise<CAFDecoder>`\n\nCreates a decoder instance.\n\n- **`dec.decode(data)`** — decode chunk, returns `{ channelData, sampleRate }`\n- **`dec.flush()`** — flush (returns empty — CAF is stateless)\n- **`dec.free()`** — release resources\n\n## Formats\n\n- `lpcm` — 8, 16, 24, 32-bit signed integer (LE/BE), 32/64-bit float (LE/BE)\n- `alaw` — G.711 A-law\n- `ulaw` — G.711 mu-law\n\n## License\n\nMIT\n\n<a href=\"https://github.com/krishnized/license/\">ॐ</a>\n","readmeFilename":"README.md"}