mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2024-12-22 14:02:29 -05:00
Merge pull request #41 from LLK/bugfix/sound-onended
Use native audio buffer source node
This commit is contained in:
commit
19e1136e3b
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue