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

scratch-audio

Package Overview
Dependencies
Maintainers
1
Versions
455
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.1500997011 to 0.1.0-prerelease.1500997049

2

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

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

@@ -47,16 +47,3 @@ const SoundPlayer = require('./SoundPlayer');

const audioData = request.response;
// Check for newer promise-based API
let loaderPromise;
if (this.audioContext.decodeAudioData.length === 1) {
loaderPromise = this.audioContext.decodeAudioData(audioData);
} else {
// Fall back to callback API
loaderPromise = new Promise((resolve, reject) => {
this.audioContext.decodeAudioData(audioData,
decodedAudio => resolve(decodedAudio),
error => reject(error)
);
});
}
loaderPromise.then(buffer => {
this.audioContext.decodeAudioData(audioData).then(buffer => {
this.drumSounds[i].setBuffer(buffer);

@@ -63,0 +50,0 @@ });

@@ -207,14 +207,3 @@ const log = require('./log');

case '':
// Check for newer promise-based API
if (this.audioContext.decodeAudioData.length === 1) {
loaderPromise = this.audioContext.decodeAudioData(bufferCopy);
} else {
// Fall back to callback API
loaderPromise = new Promise((resolve, reject) => {
this.audioContext.decodeAudioData(bufferCopy,
decodedAudio => resolve(decodedAudio),
error => reject(error)
);
});
}
loaderPromise = this.audioContext.decodeAudioData(bufferCopy);
break;

@@ -221,0 +210,0 @@ case '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