
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
@toots/libsamplerate.js
Advanced tools
This repository provides a build of the samplerate conversion library in JavaScript/wasm.
Using npm
:
npm install @toots/libsamplerate.js
Using yarn
:
yarn add @toots/libsamplerate.js
Using pnpm
:
pnpm install @toots/libsamplerate.js
In a HTML page:
When using webpack
, the package should point to the correct
libsamplerate_browser.js
file automatically.
When using directly as a script, you can load the libsamplerate_node.js
file as:
<script src="libsamplerate_node.js"></script>
The encoding API should be quite straight forward:
import { Samplerate, Converter } from "@toots/libsamplerate.js";
const exec = async () => {
await Samplerate.initialized;
const resampler = new Samplerate(Converter.FASTEST);
const result = resampler.process({
data: buffer, // buffer is a Float32Aray or a Int16Array
ratio: 1.5,
last: false
});
const converted = result.data; // same type as buffer above
const used = result.used; // input samples effectively used
// Close:
resampler.close();
}
exec();
Romain Beauxis toots@rastageeks.org
Code derived from libmp3lame-js by: Andreas Krennmair ak@synflood.at
libsamplerate.js is published under the license terms as samplerate.
FAQs
Javascript/wasm bindings to libsamplerate.
We found that @toots/libsamplerate.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.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.