audio-buffer-list
Advanced tools
+23
-14
@@ -23,2 +23,6 @@ /** | ||
| if (isPlainObj(arg)) { | ||
| options = arg | ||
| arg = null | ||
| } | ||
| if (typeof options === 'number') { | ||
@@ -43,2 +47,7 @@ options = {channels: options} | ||
| //test instance | ||
| AudioBufferList.isInstance = function (a) { | ||
| return a instanceof AudioBufferList | ||
| } | ||
| //copy from channel into destination array | ||
@@ -94,4 +103,4 @@ AudioBufferList.prototype.copyFromChannel = function (destination, channel, from, to) { | ||
| AudioBufferList.prototype.append = function (buf) { | ||
| //FIXME: we may want to do resampling/channel mapping here or something | ||
| var i = 0 | ||
| //FIXME: we may want to do resampling/channel mapping here or something | ||
| var i = 0 | ||
@@ -112,7 +121,7 @@ // unwrap argument into individual BufferLists | ||
| else if (buf) { | ||
| buf = util.create(buf, this.numberOfChannels) | ||
| this._appendBuffer(buf) | ||
| } | ||
| buf = util.create(buf, this.numberOfChannels) | ||
| this._appendBuffer(buf) | ||
| } | ||
| return this | ||
| return this | ||
| } | ||
@@ -169,10 +178,10 @@ | ||
| if (typeof srcStart != 'number' || srcStart < 0) | ||
| srcStart = 0 | ||
| if (typeof srcEnd != 'number' || srcEnd > this.length) | ||
| srcEnd = this.length | ||
| if (srcStart >= this.length) | ||
| return dst || new AudioBuffer(null, {length: 0}) | ||
| if (srcEnd <= 0) | ||
| return dst || new AudioBuffer(null, {length: 0}) | ||
| if (typeof srcStart != 'number' || srcStart < 0) | ||
| srcStart = 0 | ||
| if (typeof srcEnd != 'number' || srcEnd > this.length) | ||
| srcEnd = this.length | ||
| if (srcStart >= this.length) | ||
| return dst || new AudioBuffer(null, {length: 0}) | ||
| if (srcEnd <= 0) | ||
| return dst || new AudioBuffer(null, {length: 0}) | ||
@@ -179,0 +188,0 @@ var copy = !!dst |
+1
-1
| { | ||
| "name": "audio-buffer-list", | ||
| "version": "3.1.0", | ||
| "version": "3.2.0", | ||
| "description": "Data structure for sequence of AudioBuffers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+6
-1
@@ -26,3 +26,3 @@ # audio-buffer-list [](https://travis-ci.org/audiojs/audio-buffer-list) [](http://github.com/badges/stability-badges) [](https://greenkeeper.io/) | ||
| * [new AudioBufferList(src, opts?)](#new-audiobufferlistsource-options) | ||
| * [new AudioBufferList(src?, opts?)](#new-audiobufferlistsource-options) | ||
| * [list.append(buf)](#listappendbuffer) | ||
@@ -46,2 +46,3 @@ * [list.insert(idx?, buf)](#listinsertoffset0-buffer) | ||
| * [list.destroy()](#listdestroy) | ||
| * [AudioBufferList.isInatance(arg)](#audiobufferlistisinstancearg) | ||
@@ -151,2 +152,6 @@ ### `new AudioBufferList(source, options?)` | ||
| ### `AudioBufferList.isInstance(arg)` | ||
| Check if passed argument is instance of _AudioBufferList_. | ||
| ## See also | ||
@@ -153,0 +158,0 @@ |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
23401
1.58%460
1.77%160
3.23%