Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ogg-opus-decoder

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ogg-opus-decoder - npm Package Compare versions

Comparing version 1.3.7 to 1.3.8

4

package.json
{
"name": "ogg-opus-decoder",
"version": "1.3.7",
"version": "1.3.8",
"description": "Web Assembly streaming Ogg Opus decoder",

@@ -52,4 +52,4 @@ "type": "module",

"dependencies": {
"@wasm-audio-decoders/common": "4.0.0"
"@wasm-audio-decoders/common": "4.0.1"
}
}
# `ogg-opus-decoder`
`ogg-opus-decoder` is a Web Assembly Ogg Opus audio decoder.
* 108.4 KiB minified bundle size
* 107.7 KiB minified bundle size
* Browser and NodeJS support

@@ -6,0 +6,0 @@ * Built in Web Worker support

@@ -61,3 +61,3 @@ import { WASMAudioDecoderCommon } from "@wasm-audio-decoders/common";

throw Error(
`Data to decode must be Uint8Array. Instead got ${typeof data}`
"Data to decode must be Uint8Array. Instead got " + typeof data
);

@@ -70,12 +70,15 @@

try {
while (offset < data.length) {
const dataLength = data.length;
while (offset < dataLength) {
const dataToSend = data.subarray(
offset,
offset +
(this._input.len > data.length - offset
? data.length - offset
(this._input.len > dataLength - offset
? dataLength - offset
: this._input.len)
);
offset += dataToSend.length;
const dataToSendLength = dataToSend.length;
offset += dataToSendLength;

@@ -87,3 +90,3 @@ this._input.buf.set(dataToSend);

this._input.ptr,
dataToSend.length,
dataToSendLength,
this._channelsDecoded.ptr,

@@ -105,8 +108,10 @@ this._output.ptr

} catch (e) {
if (e.code)
const errorCode = e.code;
if (errorCode)
throw new Error(
"libopusfile " +
e.code +
errorCode +
" " +
(OggOpusDecoder.errors.get(e.code) || "Unknown Error")
(OggOpusDecoder.errors.get(errorCode) || "Unknown Error")
);

@@ -113,0 +118,0 @@ throw e;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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