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

audio-effects

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

audio-effects - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

15

dist/audio-nodes/effects/Reverb.js

@@ -15,3 +15,2 @@ "use strict";

function Reverb(audioContext, buffer) {
var _this = this;
_super.call(this, audioContext);

@@ -39,18 +38,10 @@ this.nodes = {

this.level = 1;
// Set the convolver buffer
if (buffer) {
this.buffer = buffer;
}
else {
this.getInputResponseFile().then(function (buffer) {
_this.buffer = buffer;
});
}
}
/**
* Get the standard input responsefile.
* @param {string} A path to the input response file
* @return {Promise<AudioBuffer>}
*/
Reverb.prototype.getInputResponseFile = function () {
return fetch('../../audio/hall-reverb.ogg', {
Reverb.getInputResponseFile = function (file) {
return fetch(file, {
method: 'get'

@@ -57,0 +48,0 @@ }).then(function (response) {

2

package.json
{
"name": "audio-effects",
"version": "1.2.0",
"version": "1.2.1",
"description": "A javascript library to create audio effects using the web-audio-api",

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

@@ -120,26 +120,5 @@ # Audio-effects

reverb.level = 1; // Set the level to 100%
```
By default the reverb effect will use the hall-reverb impulse response file from the awesome [web-audio-playground](https://github.com/cwilso/WebAudio) by Chris Wilson.
if you want to use your own impulse response file you can configure it in 2 ways:
```javascript
const irf = fetch('path/to/impulse-response-file', {
method: 'get'
}).then(response => {
return response.arrayBuffer();
ReverbNode.getInputResponseFile('path/to/input-response-file').then(buffer => {
reverb.buffer = buffer;
});
// Option 1: pass it as a parameter when creating the reverb effect
irf.then(buffer => {
const reverb = new Reverb(audioContext, buffer);
});
// Option 2: set the buffer after creating the reverb effect
const reverb = new Reverb(audioContext);
irf.then(buffer => {
reverb.buffer = buffer;
});
```

@@ -146,0 +125,0 @@

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