
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
The module format of the package has chnaged to ES6 module from CommonJS.
KSS.loadFromUrl(url)
is removed in order to eliminate dependence on fetch
API.
Use the following code instead if required.
async function loadKSSFromUrl(url) {
const res = await fetch(url);
const ab = await res.arrayBuffer();
return KSS.createUniqueInstance(new Uint8Array(ab), url);
}
KSSPlay.initialize()
must be called with await before using KSSPlay.
npm install --save libkss-js
const { KSS, KSSPlay } = require('libkss-js');
const { WaveFile } = require('wavefile');
const fs = require('fs');
async function loadKSSFromUrl(url) {
const res = await fetch(url);
const ab = await res.arrayBuffer();
return KSS.createUniqueInstance(new Uint8Array(ab), url);
}
async function main() {
await KSSPlay.initialize(); // must be called before using KSSPlay.
const RATE = 44100;
const kssplay = new KSSPlay(RATE);
const kss = await KSS.loadFromUrl('https://digital-sound-antiques.github.io/msxplay-js/demo/grider.mgs');
kssplay.setData(kss);
kssplay.reset();
const samples = kssplay.calc(RATE * 30); // Generate 30 seconds
const wav = new WaveFile();
wav.fromScratch(1, RATE, '16', samples);
fs.writeFileSync('test.wav', wav.toBuffer());
kssplay.release();
kss.release();
}
main();
To build libkss.js, Emscripten 2.0.0 or greater is required. The latest tested version is 3.1.21.
emcmake
and cmake
with some proper C compiler is required before npm install.
git clone --recursive https://github.com/digital-sound-antiques/libkss-js.git
cd libkss-js
npm install
npm run build
FAQs
KSS player library for Javascript
We found that libkss-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.