audio-buffer-list
Advanced tools
Comparing version 1.5.1 to 1.5.2
26
index.js
@@ -249,10 +249,7 @@ /** | ||
if (start < 0) | ||
start += this.length | ||
if (end < 0) | ||
end += this.length | ||
start = nidx(start, this.length) | ||
end = nidx(end, this.length) | ||
if (start == end) { | ||
let res = new AudioBufferList([]) | ||
return res | ||
return new AudioBufferList() | ||
} | ||
@@ -264,10 +261,13 @@ | ||
if (startOffset[1] != 0) | ||
buffers[0] = util.subbuffer(buffers[0], startOffset[1]) | ||
if (endOffset[1] == 0) | ||
if (endOffset[1] == 0) { | ||
buffers.pop() | ||
else | ||
} | ||
else { | ||
buffers[buffers.length-1] = util.subbuffer(buffers[buffers.length-1], 0, endOffset[1]) | ||
} | ||
if (startOffset[1] != 0) { | ||
buffers[0] = util.subbuffer(buffers[0], startOffset[1]) | ||
} | ||
return new AudioBufferList(buffers) | ||
@@ -432,3 +432,3 @@ } | ||
let after = this._bufs.slice(toOffset[0] + 1) | ||
let middle = this._bufs.slice(fromOffset[0], toOffset[1] + 1) | ||
let middle = this._bufs.slice(fromOffset[0], toOffset[0] + 1) | ||
@@ -468,3 +468,3 @@ middle = middle.map((buf, idx) => { | ||
let middle = this._bufs.slice(fromOffset[0], toOffset[1] + 1) | ||
let middle = this._bufs.slice(fromOffset[0], toOffset[0] + 1) | ||
@@ -471,0 +471,0 @@ if (options.reversed) { |
{ | ||
"name": "audio-buffer-list", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "Data structure for sequence of AudioBuffers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
21691