audio-buffer-list
Advanced tools
Comparing version 4.0.3 to 4.1.0
27
index.js
@@ -466,21 +466,2 @@ /** | ||
//reverse subpart | ||
AudioBufferList.prototype.reverse = function reverse (from, to) { | ||
if (from == null) from = 0 | ||
if (to == null) to = this.length | ||
from = nidx(from, this.length) | ||
to = nidx(to, this.length) | ||
let sublist = this.slice(from, to) | ||
.map((buf) => util.reverse(buf)) | ||
sublist.buffers.reverse() | ||
this.remove(from, to-from) | ||
this.insert(from, sublist) | ||
return this | ||
} | ||
//split at the indicated indexes | ||
@@ -521,5 +502,11 @@ AudioBufferList.prototype.split = function split () { | ||
let fromOffset = this.offset(from) | ||
let toOffset = to >= this.length - 1 ? [this.buffers.length] : this.offset(to) | ||
let toOffset = this.offset(to) | ||
if (toOffset[1]) { | ||
toOffset[0] += 1 | ||
toOffset[1] = 0 | ||
} | ||
let bufs = this.buffers.slice(fromOffset[0], toOffset[0]) | ||
let buf = util.concat(bufs) | ||
@@ -526,0 +513,0 @@ |
{ | ||
"name": "audio-buffer-list", | ||
"version": "4.0.3", | ||
"version": "4.1.0", | ||
"description": "Data structure for sequence of AudioBuffers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -35,3 +35,2 @@ # audio-buffer-list [![Build Status](https://travis-ci.org/audiojs/audio-buffer-list.svg?branch=master)](https://travis-ci.org/audiojs/audio-buffer-list) [![unstable](https://img.shields.io/badge/stability-unstable-green.svg)](http://github.com/badges/stability-badges) [![Greenkeeper badge](https://badges.greenkeeper.io/audiojs/audio-buffer-list.svg)](https://greenkeeper.io/) | ||
* [list.map(fn, from?, to?)](#listmapbuffer-index-offset--bufferbool-from0-to-0) | ||
* [list.reverse(from?, to?)](#listreversestart0-end-0) | ||
* [list.repeat(times)](#listrepeatcount) | ||
@@ -113,6 +112,3 @@ * [list.copy(dst?, from?, to?)](#listcopydest-start0-end-0) | ||
``` | ||
### `list.reverse(start=0, end=-0)` | ||
Reverse indicated part of the list. Modifies list in place. | ||
### `list.repeat(count)` | ||
@@ -119,0 +115,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22533
450
154