{"_id":"@audio/wma-decode","_rev":"2-3e6629596980ae3d77234806d5dfa112","name":"@audio/wma-decode","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@audio/wma-decode","version":"1.0.0","keywords":["wma","windows-media-audio","asf","audio","decode","decoder","wasm","rockbox"],"author":{"name":"audiojs"},"license":"GPL-2.0-or-later","_id":"@audio/wma-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/wma-decode#readme","bugs":{"url":"https://github.com/audiojs/wma-decode/issues"},"dist":{"shasum":"8b8947d19c999101f94ce46c2a295575693e3b46","tarball":"https://registry.npmjs.org/@audio/wma-decode/-/wma-decode-1.0.0.tgz","fileCount":6,"integrity":"sha512-zfJ86djM8QD2wK3coNgiS9cknPCk83E77cS1iNizYx04hsBGSmQ6WMRi3kTIqC04y2ggXlfCzW4CLw1whOEZKg==","signatures":[{"sig":"MEQCIAJAq1NBc1xi9CbPry9LQMkHcm83c0q4DvUVTbeW9dwOAiBnqwQ5feirU8agA3hV+owJArJyQE8zs5FRzuSPYRniJg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":89373},"main":"wma-decode.js","type":"module","types":"wma-decode.d.ts","engines":{"node":">=16"},"exports":{".":"./wma-decode.js","./package.json":"./package.json"},"gitHead":"0aa809652f8c1e8869480c4b300dd4b393fe4302","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/wma-decode.git","type":"git"},"_npmVersion":"11.11.0","description":"Decode WMA audio via RockBox WASM","directories":{},"_nodeVersion":"25.8.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/wma-decode_1.0.0_1773603040821_0.5509101455114509","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:30:40.748Z","modified":"2026-04-04T03:30:50.782Z","1.0.0":"2026-03-15T19:30:40.964Z"},"bugs":{"url":"https://github.com/audiojs/wma-decode/issues"},"author":{"name":"audiojs"},"license":"GPL-2.0-or-later","homepage":"https://github.com/audiojs/wma-decode#readme","keywords":["wma","windows-media-audio","asf","audio","decode","decoder","wasm","rockbox"],"repository":{"url":"git+https://github.com/audiojs/wma-decode.git","type":"git"},"description":"Decode WMA audio via RockBox WASM","maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"},{"name":"jamen","email":"jamenmarz@gmail.com"}],"readme":"# wma-decode\n\nDecode WMA audio to PCM float samples. ASF demuxer in pure JS, WMA decoding via [RockBox](https://www.rockbox.org/) fixed-point decoder compiled to WASM (70 KB).\n\nPart of [audio-decode](https://github.com/audiojs/audio-decode).\n\n## Install\n\n```\nnpm i @audio/wma-decode\n```\n\n## Usage\n\n```js\nimport decode from '@audio/wma-decode'\n\nlet { channelData, sampleRate } = await decode(wmaBuffer)\n```\n\n### Streaming\n\n```js\nimport { decoder } from '@audio/wma-decode'\n\nlet dec = await decoder()\nlet result = dec.decode(chunk)\ndec.free()\n```\n\n### ASF demuxer only\n\n```js\nimport { demuxASF } from '@audio/wma-decode'\n\nlet { channels, sampleRate, bitRate, packets } = demuxASF(buffer)\n```\n\n## API\n\n### `decode(src): Promise<AudioData>`\n\nWhole-file decode. Accepts `Uint8Array` or `ArrayBuffer`.\n\n### `decoder(): Promise<WMADecoder>`\n\nCreates a decoder instance.\n\n- **`dec.decode(data)`** — decode chunk, returns `{ channelData, sampleRate }`\n- **`dec.flush()`** — flush (returns empty)\n- **`dec.free()`** — release WASM memory\n\n### `demuxASF(buf): ASFInfo`\n\nParse ASF container without decoding. Returns stream properties and raw packets.\n\n## Formats\n\n- WMA v1 (0x0160)\n- WMA v2 (0x0161)\n\nWMA Pro and Lossless are not supported. An FFmpeg-based build is available via `build-ffmpeg.sh` for those formats.\n\n## Building WASM\n\n```\nnpm run build\n```\n\nRockBox source is included in `lib/rockbox-wma/` (3 files, 152 KB).\n\n## License\n\nGPL-2.0+ (RockBox)\n\n<a href=\"https://github.com/krishnized/license/\">ॐ</a>\n","readmeFilename":"README.md"}