ogg-opus-decoder
Advanced tools
Comparing version 1.3.7 to 1.3.8
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
248452
1057
+ Added@wasm-audio-decoders/common@4.0.1(transitive)
- Removed@wasm-audio-decoders/common@4.0.0(transitive)