Last active
May 19, 2019 07:08
-
-
Save CarloCattano/919913b2f06fa244ad8fbd6d3530b722 to your computer and use it in GitHub Desktop.
This file contains 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
// Imported from within Home.vue app | |
import Tone from "tone"; | |
import StartAudioContext from "startaudiocontext"; | |
export default { | |
name: "home", | |
created() { | |
//need to start audio context this way due to new browser restrictions | |
StartAudioContext(Tone.context, "#button").then(function() { | |
console.log("audio context started"); | |
}); | |
Tone.context.latencyHint = "interactive"; | |
const audioContext = Tone.context; | |
const destination = audioContext.createMediaStreamDestination(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment