jshint and jsdoc the merger

This commit is contained in:
Yotam Mann 2014-06-17 11:40:01 -04:00
parent 766951c8ae
commit c4f8a98c2f

View file

@ -1,27 +1,43 @@
///////////////////////////////////////////////////////////////////////////////
//
// MERGE
//
// Merge a left and a right into a single left/right channel
///////////////////////////////////////////////////////////////////////////////
define(["Tone/core/Tone"], function(Tone){
/**
* merge a left and a right channel into a single stereo channel
*
* instead of connecting to the input, connect to either the left, or right input
*
* default input for connect is left input
*
* @constructor
* @extends {Tone}
*/
Tone.Merge = function(){
Tone.call(this);
//components
this.left = this.context.createGain();
/**
* the left input channel
* also an alias for the input
* @type {GainNode}
*/
this.left = this.input;
/**
* the right input channel
* @type {GainNode}
*/
this.right = this.context.createGain();
/**
* the merger node for the two channels
* @type {ChannelMergerNode}
*/
this.merger = this.context.createChannelMerger(2);
//connections
this.left.connect(this.merger, 0, 0);
this.right.connect(this.merger, 0, 1);
this.merger.connect(this.output);
}
};
Tone.extend(Tone.Merge);
return Tone.Merge;
})
});