Created
June 11, 2019 06:56
-
-
Save vitaliy-bobrov/fdc4549520f7d9b1dce463540defc956 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
const context = new AudioContext(); | |
if (context.state === 'suspended') { | |
await context.resume(); | |
} | |
const stream = await navigator.mediaDevices | |
.getUserMedia({ | |
audio: { | |
echoCancellation: false, | |
autoGainControl: false, | |
noiseSuppression: false, | |
latency: 0 | |
} | |
}); | |
const lineInSource = context.createMediaStreamSource(stream); | |
lineInSource.connect(context.destination); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment