mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2024-12-22 14:02:29 -05:00
soundplayers are explicitly connected to output node when created
This commit is contained in:
parent
42f231858a
commit
002a378d97
1 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue