{"versions":{"1.0.0":{"name":"@ra2web/wavefile","version":"1.0.0","description":"WAV file processing library extracted from ra2web project","main":"index.js","type":"module","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["wav","audio","sound","file","processing","ra2web"],"author":{"name":"ra2web team"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ra2web/wavefile.git"},"homepage":"https://github.com/ra2web/wavefile#readme","bugs":{"url":"https://github.com/ra2web/wavefile/issues"},"engines":{"node":">=14.0.0"},"_id":"@ra2web/wavefile@1.0.0","gitHead":"d9e1f5a88c8bf26ee685e7b3ab544bdabf67b080","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-0JwcD/cpP8exLtiiyZ+tvfkGJKyVrPn6X3rEDJSic/BFzkKbFgCdY7MrPYdHtxwn/a8meOf92KOeNv5cSoxOQQ==","shasum":"d4500f2275140596e4ff49a5434a0dde53a5cb92","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@ra2web/wavefile/-/wavefile-1.0.0.tgz","fileCount":3,"unpackedSize":63729,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDtT7L2ORQ8St84J70n63JPzr9uLq06nMveKOoXC9DtLgIhALheH+costLWhI1LswiB/5WPyGW+H3M0y8xMxh0ND13O"}],"size":15005},"_npmUser":{"name":"anonymous","email":"contact@ra2web.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"contact@ra2web.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wavefile_1.0.0_1748535385525_0.21314791533526845"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-05-29T16:16:25.715Z","publish_time":1748535385715,"_source_registry_name":"default","contributors":[]},"1.0.1":{"name":"@ra2web/wavefile","version":"1.0.1","description":"WAV file processing library extracted from ra2web project","main":"index.js","types":"index.d.ts","type":"module","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["wav","audio","sound","file","processing","ra2web"],"author":{"name":"ra2web team"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ra2web/wavefile.git"},"homepage":"https://github.com/ra2web/wavefile#readme","bugs":{"url":"https://github.com/ra2web/wavefile/issues"},"engines":{"node":">=14.0.0"},"_id":"@ra2web/wavefile@1.0.1","gitHead":"d9e1f5a88c8bf26ee685e7b3ab544bdabf67b080","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-gTkxmMsDrZTnrateBTRa4Xwi4SL5QzwwRVVlSjlaC9fhroFkq5EmqUkm4kzaPpTkewuUL81dt1CXyFJvOskp7Q==","shasum":"068706712b0ca0533e110c93807286f002a5199e","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@ra2web/wavefile/-/wavefile-1.0.1.tgz","fileCount":4,"unpackedSize":66638,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIG8zS1oiBwWQJnj6hSxByMJVcQbR2QaIEfG5ExA2xU9TAiBCcvRy3fKVELhCYWvUz99QJawFrAhimCqBgurFBXv6XQ=="}],"size":16143},"_npmUser":{"name":"anonymous","email":"contact@ra2web.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"contact@ra2web.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wavefile_1.0.1_1748834481077_0.2632234690903892"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-06-02T03:21:21.375Z","publish_time":1748834481375,"_source_registry_name":"default","contributors":[]},"1.0.2":{"name":"@ra2web/wavefile","version":"1.0.2","description":"WAV file processing library from ra2web project","main":"index.js","types":"index.d.ts","type":"module","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["wav","audio","sound","file","processing","ra2web"],"author":{"name":"ra2web team"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ra2web/wavefile.git"},"homepage":"https://ra2web.com","bugs":{"url":"https://github.com/ra2web/wavefile/issues"},"engines":{"node":">=14.0.0"},"_id":"@ra2web/wavefile@1.0.2","gitHead":"d9e1f5a88c8bf26ee685e7b3ab544bdabf67b080","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-099MSEhaLJd3ojNJW9WZSpbKY6W5vvNqmjGTIB13WIAnwVwLv49io+1E+AcI1hF8gT7H9VVfaAE+RDIraNdb8g==","shasum":"3ec9fa7deb78f4fca1b7238040b6ae6115bb2f5c","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@ra2web/wavefile/-/wavefile-1.0.2.tgz","fileCount":5,"unpackedSize":67417,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFEkzXuXWV2WGjql9Vlg+4Su6QEOSitnnZLfGU4+oJ0bAiAH6VSOWhutDF6sU8LoumwzHH7rpIne1DmoMtIwKvqWLQ=="}],"size":16350},"_npmUser":{"name":"anonymous","email":"contact@ra2web.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"contact@ra2web.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wavefile_1.0.2_1748834862709_0.30121364833987974"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-06-02T03:27:42.895Z","publish_time":1748834862895,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"1.0.2"},"name":"@ra2web/wavefile","time":{"created":"2025-05-29T16:17:30.148Z","modified":"2025-06-02T03:29:33.194Z","1.0.0":"2025-05-29T16:16:25.715Z","1.0.1":"2025-06-02T03:21:21.375Z","1.0.2":"2025-06-02T03:27:42.895Z"},"readme":"# @ra2web/wavefile\n\nA WAV file processing library extracted from the ra2web project. This library provides comprehensive functionality for reading, writing, and manipulating WAV audio files.\n\n## Features\n\n- Read and write WAV files\n- Support for various bit depths (8, 16, 24, 32, 64-bit)\n- Support for floating-point audio formats (32f, 64)\n- Audio compression formats (IMA-ADPCM, A-Law, μ-Law)\n- Sample rate conversion\n- Bit depth conversion\n- Audio format conversion\n- Base64 encoding/decoding\n- Data URI support\n\n## Installation\n\n```bash\nnpm install @ra2web/wavefile\n```\n\n## Usage\n\n### Basic Usage\n\n```javascript\nimport { WaveFile } from '@ra2web/wavefile';\n\n// Create a new WaveFile instance\nconst wav = new WaveFile();\n\n// Load from buffer\nconst buffer = /* your audio buffer */;\nwav.fromBuffer(buffer);\n\n// Access audio properties\nconsole.log('Sample Rate:', wav.fmt.sampleRate);\nconsole.log('Channels:', wav.fmt.numChannels);\nconsole.log('Bit Depth:', wav.bitDepth);\n\n// Get samples\nconst samples = wav.getSamples();\n\n// Convert to different formats\nwav.toBitDepth('16');\nwav.toSampleRate(44100);\n\n// Export as buffer\nconst outputBuffer = wav.toBuffer();\n```\n\n### Format Conversion\n\n```javascript\n// Convert to different compression formats\nwav.toALaw();        // Convert to A-Law\nwav.toMuLaw();       // Convert to μ-Law\nwav.toIMAADPCM();    // Convert to IMA-ADPCM\n\n// Convert from compressed formats\nwav.fromALaw();\nwav.fromMuLaw();\nwav.fromIMAADPCM();\n```\n\n### Base64 and Data URI Support\n\n```javascript\n// Convert to Base64\nconst base64String = wav.toBase64();\n\n// Load from Base64\nwav.fromBase64(base64String);\n\n// Convert to Data URI\nconst dataUri = wav.toDataURI();\n\n// Load from Data URI\nwav.fromDataURI(dataUri);\n```\n\n## API Reference\n\n### WaveFile Class\n\n#### Constructor\n- `new WaveFile(buffer?)` - Create a new WaveFile instance, optionally from a buffer\n\n#### Methods\n\n##### File I/O\n- `fromBuffer(buffer)` - Load WAV data from a buffer\n- `toBuffer()` - Export WAV data as a buffer\n- `fromBase64(base64String)` - Load WAV data from Base64 string\n- `toBase64()` - Export WAV data as Base64 string\n- `fromDataURI(dataUri)` - Load WAV data from Data URI\n- `toDataURI()` - Export WAV data as Data URI\n\n##### Format Conversion\n- `toBitDepth(bitDepth, dithered?)` - Convert bit depth\n- `toSampleRate(sampleRate, options?)` - Convert sample rate\n- `toRIFF()` - Convert to RIFF format\n- `toRIFX()` - Convert to RIFX format\n\n##### Compression\n- `toALaw()` - Convert to A-Law compression\n- `fromALaw(bitDepth?)` - Convert from A-Law compression\n- `toMuLaw()` - Convert to μ-Law compression\n- `fromMuLaw(bitDepth?)` - Convert from μ-Law compression\n- `toIMAADPCM()` - Convert to IMA-ADPCM compression\n- `fromIMAADPCM(bitDepth?)` - Convert from IMA-ADPCM compression\n\n##### Audio Data\n- `getSamples(interleaved?)` - Get audio samples\n\n#### Properties\n- `fmt` - Format chunk data\n- `data` - Audio data chunk\n- `bitDepth` - Current bit depth\n- `container` - Container format (RIFF/RIFX/RF64)\n\n## License\n\nMIT\n\n## Contributing\n\nThis library was extracted from the ra2web project. For issues and contributions, please refer to the original project repository.","users":{}}