Web AUDIO api question. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Web AUDIO api question.

How can I control the volume in following code. https://code.sololearn.com/W3fa7g46h21y/?ref=app

25th Jul 2022, 2:49 AM
Ayush Kumar
Ayush Kumar - avatar
1 Answer
+ 4
You were just connecting the panner node to the destination that's why modifying volume node didn't had any effect cause it's not connected to the destination do it like oscillator.connect(volume).connect(panner).connect(audioCtx.destination) working code: https://code.sololearn.com/W9dgWbNF1lA9/?ref=app
25th Jul 2022, 3:16 AM
Arnav Kumar [Less/Not Active]
Arnav Kumar [Less/Not Active] - avatar