Socket
Socket
Sign inDemoInstall

@wasm-audio-decoders/common

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wasm-audio-decoders/common - npm Package Compare versions

Comparing version 9.0.1 to 9.0.2

2

package.json
{
"name": "@wasm-audio-decoders/common",
"version": "9.0.1",
"version": "9.0.2",
"description": "Web Assembly Audio Decoders Common",

@@ -5,0 +5,0 @@ "module": "index.js",

@@ -26,3 +26,3 @@ import fs from "fs";

wasmCommon.substring(wasmEndIdx),
].map(Buffer.from)
].map(Buffer.from),
);

@@ -29,0 +29,0 @@

@@ -26,7 +26,7 @@ export default function WASMAudioDecoderCommon() {

module = WASMAudioDecoderCommon.inflateDynEncodeString(
wasmString
wasmString,
).then((data) => WebAssembly.compile(data));
} else {
module = WebAssembly.compile(
WASMAudioDecoderCommon.decodeDynString(wasmString)
WASMAudioDecoderCommon.decodeDynString(wasmString),
);

@@ -74,3 +74,3 @@ }

sampleRate,
bitDepth
bitDepth,
) {

@@ -85,3 +85,3 @@ let channelData = [],

channelData.push(
WASMAudioDecoderCommon.concatFloat32(channel, samplesDecoded)
WASMAudioDecoderCommon.concatFloat32(channel, samplesDecoded),
);

@@ -95,3 +95,3 @@ }

sampleRate,
bitDepth
bitDepth,
);

@@ -137,4 +137,4 @@ },

while (i < source.length) {
byte = source.charCodeAt(i++);
for (; i < source.length; i++) {
byte = source.charCodeAt(i);

@@ -146,2 +146,18 @@ if (byte === 61 && !escaped) {

// work around for encoded strings that are UTF escaped
if (
byte === 92 && // /
i < source.length - 5
) {
const secondCharacter = source.charCodeAt(i + 1);
if (
secondCharacter === 117 || // u
secondCharacter === 85 // U
) {
byte = parseInt(source.substring(i + 2, i + 6), 16);
i += 5;
}
}
if (escaped) {

@@ -213,3 +229,3 @@ escaped = false;

dataArray.byteLength - heapPos,
true
true,
);

@@ -223,4 +239,4 @@

heapPos,
heapPos + heapView.getInt32(destLengthPtr, true)
)
heapPos + heapView.getInt32(destLengthPtr, true),
),
);

@@ -247,4 +263,4 @@ });

i * samplesDecoded,
i++ * samplesDecoded + samplesDecoded
)
i++ * samplesDecoded + samplesDecoded,
),
);

@@ -288,3 +304,3 @@

inputBytes,
outputSamples
outputSamples,
) => {

@@ -291,0 +307,0 @@ errors.push({

@@ -59,4 +59,4 @@ import NodeWorker from "@eshaz/web-worker";

? data.map((data) => new Uint8Array(data))
: new Uint8Array(data)
)
: new Uint8Array(data),
),
);

@@ -71,3 +71,3 @@ // The "transferList" parameter transfers ownership of channel data to main thread,

messagePromise.then(() =>
self.postMessage(messagePayload, transferList)
self.postMessage(messagePayload, transferList),
);

@@ -83,3 +83,3 @@ };

? `data:${type};base64,${Buffer.from(webworkerSourceCode).toString(
"base64"
"base64",
)}`

@@ -86,0 +86,0 @@ : URL.createObjectURL(new Blob([webworkerSourceCode], { type }));

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc