{"_id":"@2003scape/rsc-sounds","_rev":"2-62f25aef74c73368bedcbf97c00d3cb2","name":"@2003scape/rsc-sounds","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@2003scape/rsc-sounds","version":"1.0.0","description":"extract runescape classic sounds from cache to wav (and vice versa)","main":"./src/index.js","bin":{"rsc-sounds":"./src/bin.js"},"repository":{"type":"git","url":"git+https://github.com/2003scape/rsc-sounds.git"},"keywords":["runescape","rsc","cache","sound","ulaw","wav"],"author":{"name":"2003Scape Team"},"license":"AGPL-3.0+","bugs":{"url":"https://github.com/2003scape/rsc-sounds/issues"},"homepage":"https://github.com/2003scape/rsc-sounds#readme","dependencies":{"@2003scape/rsc-archiver":"^1.1.0","audio-speaker":"^1.5.0","libsamplerate.js":"^1.0.0","wavefile":"^8.4.6","yargs":"^15.0.2"},"browser":{"audio-speaker":false},"devDependencies":{"brfs":"^2.0.2"},"gitHead":"405108582e5ff898dd50a5db6ec0181101c96199","_id":"@2003scape/rsc-sounds@1.0.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","_npmUser":{"name":"misterhat","email":"misterhat144@gmail.com"},"maintainers":[{"name":"misterhat","email":"misterhat144@gmail.com"}],"dist":{"integrity":"sha512-tXgPnjoHodmFZAuIokf7XZ2uFbOMEpK0NITOreLPxmEpvi17gGcvYXusQ2tEhBi3boxMq9Fr8G0bZUk673Vu3A==","shasum":"e45785d773bbfc61ec9dfb9a66688177d4c614ae","tarball":"https://registry.npmjs.org/@2003scape/rsc-sounds/-/rsc-sounds-1.0.0.tgz","fileCount":48,"unpackedSize":712358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7T+dCRA9TVsSAnZWagAAlVwP/2AAIxxmAfDBrwxs1ZaM\nf0HiGwcSq2/CUIb2sTPeNQSasA4hEwmdRGBzMnMoZIC96kBOHQgfSmgjRNKI\nLdystpotrR2h9A0fE+A80C+b4uuasQu6kVqaSgOwRapnp4CXW5yxp50T0SXQ\n544sy57qu0g9etiwypxAe4FBLS99rNnVQVZOuJ8CRpPTK6eHdZU5aytPxPuF\ndUxth7k52+lBJecXiGrNXyZJUVHgloZwTdnNsuFohjRqsnD4yHpIMvF/p1F7\nC+yWeGL6SAj2z2mkQPLWt/LH1ugDUtW8qsNbNNwWO80YUYed8vcD8m61q1kA\nAO5uCiiiQVRbdPLRazrxFOePGKnhtM/XQ28UhaKa2vD0CEDV1YVr2fYv2sac\nH87TzIdHYUMmN17vT6ubHqkucKG/h60lacN19gOZBjdzH/78dH57noDKfmQw\ngnK1dpLOtDQorMWIlLsXnBRymEDE2ofNHYj04U0xgzT/1itTWP51XloBduhK\nG+H1xHBc/PXmShhvGNLTZV5BqwhgqVga59Wmz/B44EkAMo2Eso+LWHZYHrcT\nA1ZBK/qvb4DDCzVhjZEd0Z588dv9meK+6MiNxrzFGocI0BNBVCNC8BfjcH/7\ngN2wbI6Cs7yhzTEimJriiCtJU3kMcrCTeYlb05H6ZdNEHJ3ki/i1T4vuYrZo\nuf+3\r\n=2yVL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEjjP8uFhyJKN1fzdWhm4zEUctHIk/pz0aAOwzAglTZ4AiBnweUBqUCiwE98CYouDfqhDvTT8awFoxaRZDzpjgesxQ=="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rsc-sounds_1.0.0_1575829404914_0.08051341914738575"},"_hasShrinkwrap":false},"1.0.1":{"name":"@2003scape/rsc-sounds","version":"1.0.1","description":"extract runescape classic sounds from cache to wav (and vice versa)","main":"./src/index.js","bin":{"rsc-sounds":"./src/bin.js"},"repository":{"type":"git","url":"git+https://github.com/2003scape/rsc-sounds.git"},"keywords":["runescape","rsc","cache","sound","ulaw","wav"],"author":{"name":"2003Scape Team"},"license":"AGPL-3.0+","bugs":{"url":"https://github.com/2003scape/rsc-sounds/issues"},"homepage":"https://github.com/2003scape/rsc-sounds#readme","dependencies":{"@2003scape/rsc-archiver":"^1.1.0","libsamplerate.js":"^1.0.0","wavefile":"^8.4.6","yargs":"^15.0.2","audio-speaker":"^1.5.0"},"optionalDependencies":{"audio-speaker":"^1.5.0"},"browser":{"audio-speaker":false},"devDependencies":{"brfs":"^2.0.2"},"gitHead":"405108582e5ff898dd50a5db6ec0181101c96199","_id":"@2003scape/rsc-sounds@1.0.1","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","_npmUser":{"name":"misterhat","email":"misterhat144@gmail.com"},"maintainers":[{"name":"misterhat","email":"misterhat144@gmail.com"}],"dist":{"integrity":"sha512-pl3PNiWJjs0wJGps0vh4GIWUykI8dCqJFcqcwmUWpQh5mHYQPx2aDJdwxY3KIDTkfFamp84iqMLDyRApDkQ1PA==","shasum":"0c64109e1d91bfc39a206dcd96aa7366344eb972","tarball":"https://registry.npmjs.org/@2003scape/rsc-sounds/-/rsc-sounds-1.0.1.tgz","fileCount":48,"unpackedSize":712391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7UKTCRA9TVsSAnZWagAAioMQAItfeIvjbjFMLejC6Gfg\n8Bohu0w0FzHa+VQ2+twpINya5m6S5A+WZHgzmPIyuP4jjzwywYiPohFD2BvW\nRvhoOJuvb7ieScl2VRQ7kTtirSNDbJ6NAnhGvnbOo+viY/VvwyEckr3dpyBk\nF+JSHXjGpWZqBU1b1xPZd0NylD5lP9klp85lRJgb4S9tIc4608aiWjZLsco0\n0DAMO29d+eSNo4SUacABWNgw4fS5a2rwvchSIsm/GkzVss8FJXuig0c2agHW\nUCE0mXlswFAvxekhecTsyYuSqD4XwR0c3jZOQzqg9MKrQId5ZLALMYBqUP6f\nkcCIGiVsK1iVMvvABmRWDDt3aCMOcWuwtZJBxj8r3ifhJAkuWRAn++g9Q6qD\nmEr+2ennIUMow/9bjMsX5ArQlEIMpBH++OyibyWZEPj1vHbrCvG7Q7h1JkGk\nWDivQlQI+Fyph1LvhmOxtSKDesalwMyJWfqrmwkcmo6QPg21fgowcSmtFxRY\nqMLwiMhJXhGvru1H5EVXw7cfweLTcoKmgAThA4sVV06/LmEHLZxqlRwV/Eu9\nnK9jIDBV53t/pvzZQ1d4Z8ve0wkhSf3lGlsu6vOik8NtgwNKW3py8EIOkoRR\ne5eY3xhGGsFDq2rALe5XlO6eqRslDXT0U6f9iu5AcBRo/ehNJm7sGRxdrlY2\nnTp5\r\n=Zlty\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIASvxP93mHOzPuoEzvl3b/BFsi6ZeiaHhdnJsbMXN2mNAiB4mjzXrgRDg3/ryhO/CYJ24jQWUuPnOhC6RSY/aJmt6A=="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rsc-sounds_1.0.1_1575830163108_0.5838833281904621"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-08T18:23:24.678Z","1.0.0":"2019-12-08T18:23:25.282Z","modified":"2022-04-04T10:34:59.142Z","1.0.1":"2019-12-08T18:36:03.325Z"},"maintainers":[{"name":"misterhat","email":"misterhat144@gmail.com"}],"description":"extract runescape classic sounds from cache to wav (and vice versa)","homepage":"https://github.com/2003scape/rsc-sounds#readme","keywords":["runescape","rsc","cache","sound","ulaw","wav"],"repository":{"type":"git","url":"git+https://github.com/2003scape/rsc-sounds.git"},"author":{"name":"2003Scape Team"},"bugs":{"url":"https://github.com/2003scape/rsc-sounds/issues"},"license":"AGPL-3.0+","readme":"# rsc-sounds\nextract runescape classic sounds from cache to wav (and vice versa). jagex used\nSun's original [.au sound format](https://en.wikipedia.org/wiki/Au_file_format),\nwhich is headerless, 8-bit, u-law encoded, 8000 Hz pcm samples. this module can\ndecompress original sounds from sound archives as\n[headered WAVs](https://en.wikipedia.org/wiki/WAV), and recompress (+ resample)\nnew WAVs into archives.\n\n## install\n\n    $ npm install @2003scape/rsc-sounds # use -g for the CLI program\n\n## cli usage\n```\nrsc-sounds <command>\n\nCommands:\n  rsc-sounds dump-wav <archive> [sounds..]  extract WAV files from a sounds mem\n                                            archive\n  rsc-sounds pack-wav <archive> <files..>   pack WAV file(s) into a sounds mem\n                                            archive\n  rsc-sounds play <archive> <sound>         play a sound from an archive\n\nOptions:\n  --help     Show help                                                 [boolean]\n  --version  Show version number                                       [boolean]\n```\n\n    $ rsc-sounds play sounds1.mem death # play death sound on speaker\n    $ rsc-sounds pack-wav sounds2.mem scream.wav chop.wav # add new sounds\n    $ rsc-sounds dump-wav sounds1.mem -i sounds1.json # dump all original sounds\n    $ rsc-sounds dump-wav sounds1.mem death # dump death.wav\n\n## example\n```javascript\nconst fs = require('fs');\nconst { Sounds } = require('@2003scape/rsc-sounds');\n\nif (typeof window !== 'undefined') {\n    fs.writeFileSync = () => {};\n}\n\n// create sounds2.mem with a new .wav file\nconst sounds = new Sounds();\nsounds.loadArchive(fs.readFileSync('./sounds1.mem'));\nsounds.putWav('scream', fs.readFileSync('./scream.wav'));\nfs.writeFileSync('./sounds2.mem', sounds.toArchive());\n\n// load the archive and play the new sound\nconst sounds2 = new Sounds();\nsounds2.loadArchive(fs.readFileSync('./sounds2.mem'));\nfs.writeFileSync('./scream-recovered.wav', sounds2.getWav('scream'));\nconst duration = sounds2.playSound('scream');\nsetTimeout(() => console.log('done'), duration);\n```\n\n## api\n### sounds = new Sounds()\ncreate a new sound (de)serializer instance.\n\n### sounds.loadArchive(buffer)\nload a sounds mem archive buffer.\n\n### sounds.putWav(name, buffer)\nre-encode and re-sample any WAV file and add it to the archive buffer.\n\n### sounds.getWav(name)\nreturn a headered WAV file from the archive buffer.\n\n### sounds.playSound(name)\nplay a sound from the archive on the speakers (works in browser as well).\n\n### sounds.toArchive()\nreturn a sounds mem archive.\n\n## license\nCopyright 2019  2003Scape Team\n\nThis program is free software: you can redistribute it and/or modify it under\nthe terms of the GNU Affero General Public License as published by the\nFree Software Foundation, either version 3 of the License, or (at your option)\nany later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License along\nwith this program. If not, see http://www.gnu.org/licenses/.\n","readmeFilename":"README.md"}