Created
June 11, 2019 06:57
-
-
Save vitaliy-bobrov/97f4741abd2f64b84a12e27f95d704b0 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
// Create a gain node and set the initial value to 0.5 | |
// that means that volume will be haft of the original. | |
const gainNode = new GainNode(context, {gain: 0.5}); | |
// Disconnect source before constructing a new graph. | |
lineInSource.disconnect(); | |
// Connect nodes | |
lineInSource.connect(gainNode).connect(context.destination); | |
// Increasing volume. | |
gainNode.gain.value = 2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment