Skip to content

Commit

Permalink
Merge pull request #310 from Zalastax/documentAudioIn
Browse files Browse the repository at this point in the history
Document properties of AudioIn
  • Loading branch information
therewasaguy authored Aug 7, 2018
2 parents 3e5c085 + af5e7bf commit 9736982
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/audioin.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,26 @@ define(function (require) {
*/
p5.AudioIn = function(errorCallback) {
// set up audio input
/**
* @property {GainNode} input
*/
this.input = p5sound.audiocontext.createGain();
/**
* @property {GainNode} output
*/
this.output = p5sound.audiocontext.createGain();

/**
* @property {MediaStream|null} stream
*/
this.stream = null;
/**
* @property {MediaStreamAudioSourceNode|null} mediaStream
*/
this.mediaStream = null;
/**
* @property {Number|null} currentSource
*/
this.currentSource = null;

/**
Expand All @@ -58,7 +73,11 @@ define(function (require) {
*/
this.enabled = false;

// create an amplitude, connect to it by default but not to master out
/**
* Input amplitude, connect to it by default but not to master out
*
* @property {p5.Amplitude} amplitude
*/
this.amplitude = new p5.Amplitude();
this.output.connect(this.amplitude.input);

Expand Down

0 comments on commit 9736982

Please sign in to comment.