audio-buffer-list
Advanced tools
Comparing version 2.0.6 to 2.0.7
16
index.js
@@ -153,9 +153,11 @@ /** | ||
AudioBufferList.prototype._appendBuffer = function (buf) { | ||
// if (buf.sampleRate != this.sampleRate) throw Error('Required sample rate is ' + this.sampleRate + ', passed ' + buf.sampleRate) | ||
this.buffers.push(buf) | ||
this.length += buf.length | ||
if (!buf) return this | ||
// if (buf.numberOfChannels != this.numberOfChannels) throw Error('Required number of channels is ' + this.numberOfChannels + ', passed ' + buf.numberOfChannels) | ||
//update channels count | ||
this.numberOfChannels = Math.max(this.numberOfChannels, buf.numberOfChannels) | ||
if (!this.buffers.length) { | ||
this.numberOfChannels = buf.numberOfChannels | ||
} | ||
else { | ||
this.numberOfChannels = Math.max(this.numberOfChannels, buf.numberOfChannels) | ||
} | ||
this.duration += buf.duration | ||
@@ -166,2 +168,6 @@ | ||
//push buffer | ||
this.buffers.push(buf) | ||
this.length += buf.length | ||
return this | ||
@@ -168,0 +174,0 @@ } |
{ | ||
"name": "audio-buffer-list", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"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
461
24119