diff --git a/lib/input.js b/lib/input.js index d32700c..11a2d5d 100644 --- a/lib/input.js +++ b/lib/input.js @@ -42,13 +42,10 @@ function Input(args) { util.inherits(Input, Writable); Input.prototype.read = function (samples) { - console.log('read()'); var bytes = samples * (this.bitDepth / 8) * this.channels; if (this.buffer.length < bytes) bytes = this.buffer.length; - console.log(this.buffer.length); var r = this.buffer.slice(0, bytes); this.buffer = this.buffer.slice(bytes); - console.log(this.buffer.length); if (this.buffer.length <= 131072 && this.getMoreData !== null) { var getMoreData = this.getMoreData; @@ -60,7 +57,6 @@ Input.prototype.read = function (samples) { } Input.prototype.readMono = function (samples) { - console.log('readMono()'); // This function will be overridden by this.read, if input already is mono. var stereoBuffer = this.read(samples); var monoBuffer = new Buffer(stereoBuffer.length / 2); @@ -74,7 +70,6 @@ Input.prototype.readMono = function (samples) { } Input.prototype.readStereo = function (samples) { - console.log('readStereo()'); // This function will be overridden by this.read, if input already is stereo. var monoBuffer = this.read(samples); var stereoBuffer = new Buffer(monoBuffer.length * 2); @@ -94,8 +89,6 @@ Input.prototype.availSamples = function (length) { Input.prototype._write = function (chunk, encoding, next) { - console.log('_write', arguments); - /* if (!Buffer.isBuffer(chunk)) { chunk = new Buffer(chunk, encoding); diff --git a/lib/mixer.js b/lib/mixer.js index 7315fca..954f296 100644 --- a/lib/mixer.js +++ b/lib/mixer.js @@ -42,15 +42,12 @@ util.inherits(Mixer, Readable); Mixer.prototype._read = function() { - console.log('_read', arguments); - var samples = 9007199254740992; this.inputs.forEach(function (input) { var as = input.availSamples(); if (as < samples) samples = as; }); if (samples > 0 && samples != 9007199254740992) { - console.log('read samples', samples); var mixedBuffer = new Buffer(samples * this.sampleByteLength * this.channels); mixedBuffer.fill(0); @@ -67,7 +64,6 @@ Mixer.prototype._read = function() { this.push(mixedBuffer); } else { - console.log('Nothing to read.'); setImmediate(this._read.bind(this)); } }