soundplayers are explicitly connected to output node when created

This commit is contained in:
Eric Rosenbaum 2017-01-30 11:25:43 -05:00
parent 42f231858a
commit 002a378d97

View file

@ -1,13 +1,16 @@
var Tone = require('tone');
var log = require('./log');
function SoundPlayer (outputNode) {
this.outputNode = outputNode;
function SoundPlayer () {
this.outputNode;
this.buffer; // a Tone.Buffer
this.bufferSource;
this.playbackRate = 1;
this.isPlaying = false;
}
SoundPlayer.prototype.connect = function (node) {
this.outputNode = node;
};
SoundPlayer.prototype.setBuffer = function (buffer) {
this.buffer = buffer;