Merge pull request #41 from LLK/bugfix/sound-onended

Use native audio buffer source node
This commit is contained in:
Eric Rosenbaum 2017-04-19 14:10:59 -04:00 committed by GitHub
commit 19e1136e3b

View file

@ -60,7 +60,8 @@ class SoundPlayer {
return;
}
this.bufferSource = new Tone.BufferSource(this.buffer.get());
this.bufferSource = Tone.context.createBufferSource();
this.bufferSource.buffer = this.buffer.get();
this.bufferSource.playbackRate.value = this.playbackRate;
this.bufferSource.connect(this.outputNode);
this.bufferSource.start();