New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

opus-decoder

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opus-decoder - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

4

package.json
{
"name": "opus-decoder",
"version": "0.3.4",
"version": "0.3.5",
"description": "Web Assembly streaming Opus decoder",

@@ -43,4 +43,4 @@ "main": "dist/opus-decoder.min.js",

"dependencies": {
"@wasm-audio-decoders/common": "0.0.1"
"@wasm-audio-decoders/common": "1.0.0"
}
}

@@ -86,3 +86,3 @@ # `opus-decoder`

],
samplesDecoded: 1234, // number of PCM samples that were decoded
samplesDecoded: 1234, // number of PCM samples that were decoded per channel
sampleRate: 48000 // sample rate of the decoded PCM

@@ -89,0 +89,0 @@ }

@@ -6,11 +6,12 @@ import { WASMAudioDecoderCommon } from "@wasm-audio-decoders/common";

export default class OpusDecoder {
constructor(_WASMAudioDecoderCommon, _EmscriptenWASM) {
this._isWebWorker = _WASMAudioDecoderCommon && _EmscriptenWASM;
constructor(options = {}) {
// injects dependencies when running as a web worker
this._isWebWorker = this.constructor.isWebWorker;
this._WASMAudioDecoderCommon =
_WASMAudioDecoderCommon || WASMAudioDecoderCommon;
this._EmscriptenWASM = _EmscriptenWASM || EmscriptenWASM;
this.constructor.WASMAudioDecoderCommon || WASMAudioDecoderCommon;
this._EmscriptenWASM = this.constructor.EmscriptenWASM || EmscriptenWASM;
this._inputPtrSize = (0.12 * 510000) / 8;
this._outputPtrSize = 120 * 48;
this._channelsOut = 2;
this._outputChannels = 2;

@@ -57,4 +58,3 @@ this._ready = this._init();

opusFrame.length,
this._leftPtr,
this._rightPtr
this._outputPtr
);

@@ -64,4 +64,4 @@

[
this._leftArr.slice(0, samplesDecoded),
this._rightArr.slice(0, samplesDecoded),
this._output.slice(0, samplesDecoded),
this._output.slice(samplesDecoded, samplesDecoded * 2),
],

@@ -68,0 +68,0 @@ samplesDecoded,

@@ -6,4 +6,4 @@ import { WASMAudioDecoderWorker } from "@wasm-audio-decoders/common";

export default class OpusDecoderWebWorker extends WASMAudioDecoderWorker {
constructor() {
super(OpusDecoder, EmscriptenWASM);
constructor(options) {
super(options, OpusDecoder, EmscriptenWASM);
}

@@ -10,0 +10,0 @@

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