{"_id":"@audio/decode-dts","name":"@audio/decode-dts","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@audio/decode-dts","version":"1.0.0","description":"Decode DTS (DTS Coherent Acoustics core) audio with libdca WASM","type":"module","main":"decode-dts.js","types":"decode-dts.d.ts","exports":{".":"./decode-dts.js","./audio":{"types":"./audio.d.ts","default":"./audio.js"},"./package.json":"./package.json"},"publishConfig":{"access":"public"},"scripts":{"build":"bash build.sh","prepack":"npm run build","test":"node test.js"},"devDependencies":{"tst":"^9.2.2"},"engines":{"node":">=18"},"keywords":["dts","dts","dca","coherent acoustics","surround","5.1","audio","decode","decoder","wasm","libdca"],"license":"GPL-2.0-or-later","author":{"name":"audiojs"},"homepage":"https://github.com/audiojs/decode/tree/main/packages/decode-dts","repository":{"type":"git","url":"git+https://github.com/audiojs/decode.git","directory":"packages/decode-dts"},"bugs":{"url":"https://github.com/audiojs/decode/issues"},"audio":"./audio.js","sideEffects":false,"funding":"https://github.com/sponsors/audiojs","gitHead":"ee48dd74dd2dc5d3ed14de3757a295a1087e14dc","_id":"@audio/decode-dts@1.0.0","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-WApeOndo8C+3IzncPFg7vwRm9/ZbWjCzB93mx86en/+4/IWpUVz0W/wRINzg5gKGQa23xz5ZwGMGNC0X7i8nJw==","shasum":"e59cbce424c69e57cb47a529ce67ad871141a016","tarball":"https://registry.npmjs.org/@audio/decode-dts/-/decode-dts-1.0.0.tgz","fileCount":9,"unpackedSize":233618,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDxXzo5NEGgS0lgbNXFS1E+TMqWgfiBSfvbjmTMVhOjigIgU6sarieJdfuSFGhxV0NdsoSmk9L8LyeO1UwjJytPzMQ="}]},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"directories":{},"maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/decode-dts_1.0.0_1787864363716_0.8703015072329492"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-27T20:59:23.516Z","1.0.0":"2026-08-27T20:59:23.884Z","modified":"2026-08-27T20:59:24.094Z"},"maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"description":"Decode DTS (DTS Coherent Acoustics core) audio with libdca WASM","homepage":"https://github.com/audiojs/decode/tree/main/packages/decode-dts","keywords":["dts","dts","dca","coherent acoustics","surround","5.1","audio","decode","decoder","wasm","libdca"],"repository":{"type":"git","url":"git+https://github.com/audiojs/decode.git","directory":"packages/decode-dts"},"author":{"name":"audiojs"},"bugs":{"url":"https://github.com/audiojs/decode/issues"},"license":"GPL-2.0-or-later","readme":"# @audio/decode-dts\n\nDecode DTS (DTS Coherent Acoustics) to PCM float samples.<br>\n[libdca](https://code.videolan.org/videolan/libdca) compiled to a single-file WASM ES module — no side files, loads from any CDN, Node, workers and AudioWorklets.\n\n[![npm install @audio/decode-dts](https://nodei.co/npm/@audio/decode-dts.png?mini=true)](https://npmjs.org/package/@audio/decode-dts/)\n\n```js\nimport decode, { decoder } from '@audio/decode-dts'\n\nlet { channelData, sampleRate } = await decode(dtsBytes)\n\nlet dec = await decoder()\nlet head = dec.decode(chunk1)   // synchronous; partial frames carry over\nlet tail = dec.flush()\ndec.free()\n```\n\nInput is a raw DTS core frame stream (`.dts`, or the frames a container demuxer extracts — [@audio/decode-mp4](../decode-mp4), [@audio/decode-webm](../decode-webm) and [@audio/decode-avi](../decode-avi) route their DTS tracks here). The stream's own layout is kept, up to 5.1; channels come out in WAV order: FL, FR, FC, LFE, BL, BR (surround-only or mono as present). Output level is full scale,  \n\nDTS-HD Master Audio and High Resolution streams decode through their lossy core; the extension substreams are skipped. 14-bit and little-endian sync variants are handled.\n\n## API\n\n### `decode(src: Uint8Array | ArrayBuffer): Promise<AudioData>`\n\nDecode a complete stream.\n\n### `decoder(): Promise<DTSDecoder>`\n\nSynchronous streaming decoder: `decode(chunk)` returns the samples of every complete frame in the data so far, `flush()` drops a trailing partial frame, `free()` releases WASM memory. `errors` counts frames that failed to decode.\n\n### `AudioData`\n\n```ts\n{ channelData: Float32Array[], sampleRate: number }\n```\n\n## License\n\n[ॐ](https://github.com/krishnized/license/) · [GPL-2.0-or-later](./LICENSE), inherited from the bundled [libdca](./LICENSE.libdca).\n","readmeFilename":"README.md","_rev":"1-7c586c396a237f326771e8e3e951d4a0"}