Created
January 11, 2016 12:41
-
-
Save s3thi/b87cc000bdfdd661ae19 to your computer and use it in GitHub Desktop.
sampler.js – playSample() with playback rate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| playSample() { | |
| let bufferSource = this.audioContext.createBufferSource(); | |
| bufferSource.buffer = this.audioBuffer; | |
| bufferSource.playbackRate.value = this.playbackRate; | |
| bufferSource.connect(this.audioContext.destination); | |
| bufferSource.start(0); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment