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

audio-buffer-list

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

audio-buffer-list - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

20

index.js

@@ -99,2 +99,3 @@ /**

//shortcut single buffer preserving subarraying
if (this._bufs.length === 1) return this._bufs[0].getChannelData(channel)

@@ -398,5 +399,20 @@

//return new buffer by mapping it
AudioBufferList.prototype.map = function map (fn) {
return new AudioBufferList(this._bufs.map(fn))
AudioBufferList.prototype.map = function map (fn, from, to) {
let before, after, middle
if (from != null) {
before = this.shallowSlice(0, from)
}
if (to != null) {
after = this.shallowSlice(to)
}
if (before || after) middle = this.shallowSlice(from, to)
else middle = this
middle._bufs = middle._bufs.map(fn)
if (before) middle = before.append(middle)
if (after) middle = middle.append(after)
return middle
}

2

package.json
{
"name": "audio-buffer-list",
"version": "1.3.1",
"version": "1.3.2",
"description": "Data structure for sequence of AudioBuffers",

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

@@ -43,5 +43,5 @@ # audio-buffer-list [![Build Status](https://travis-ci.org/audiojs/audio-buffer-list.svg?branch=master)](https://travis-ci.org/audiojs/audio-buffer-list) [![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)

### `list.map((buffer, index) => buffer)`
### `list.map((buffer, index) => buffer, from=0, to=-0)`
Create new list by mapping every buffer.
Create new list by mapping every buffer. Optionally pass offsets `from` and `to` to map only subset.

@@ -48,0 +48,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