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

scratch-audio

Package Overview
Dependencies
Maintainers
1
Versions
435
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scratch-audio - npm Package Compare versions

Comparing version 0.1.0-prerelease.20181023202904 to 0.1.0-prerelease.20190108181031

2

package.json
{
"name": "scratch-audio",
"version": "0.1.0-prerelease.20181023202904",
"version": "0.1.0-prerelease.20190108181031",
"description": "audio engine for scratch 3.0",

@@ -5,0 +5,0 @@ "main": "dist.js",

@@ -153,3 +153,12 @@ class ArrayBufferStream {

readInt32 () {
const val = new Int32Array(this.arrayBuffer, this._position, 1)[0];
let val;
if (this._position % 4 === 0) {
val = new Int32Array(this.arrayBuffer, this._position, 1)[0];
} else {
// Cannot read Int32 directly out because offset is not multiple of 4
// Need to slice out the values first
val = new Int32Array(
this.arrayBuffer.slice(this._position, this._position + 4)
)[0];
}
this._position += 4; // one 32 bit int is 4 bytes

@@ -156,0 +165,0 @@ return val;

@@ -157,2 +157,7 @@ const StartAudioContext = require('./StartAudioContext');

.catch(() => {
// If the file is empty, create an empty sound
if (sound.data.length === 0) {
return Promise.resolve(this.audioContext.createBuffer(1, 1, this.audioContext.sampleRate));
}
// The audio context failed to parse the sound data

@@ -159,0 +164,0 @@ // we gave it, so try to decode as 'adpcm'

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

Sorry, the diff of this file is not supported yet

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