cleaned out most debug console.logs

This commit is contained in:
alfred 2014-01-01 03:49:53 +00:00
parent b39809e4b3
commit 797d1f28a0
2 changed files with 0 additions and 11 deletions

View File

@ -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);

View File

@ -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));
}
}