Why is there no sound after playing 10 keys? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why is there no sound after playing 10 keys?

https://code.sololearn.com/WOSO2PsirtSL/?ref=app can someone please enlighten me why after playing of 10 piano keys there is no more sound?

24th May 2019, 12:00 PM
Daniel Asherov
2 Answers
+ 1
i cant reproduce your problem. but the main thing that i notice is its incosistent sometimes the audio play, sometimes it doesnt. it seems recreating the audio context for each call is the main problem. i tried to make the context global and only initialize it once, and it fixed.
24th May 2019, 6:46 PM
Taste
Taste - avatar
+ 1
thank you! that did the trick :)
24th May 2019, 7:35 PM
Daniel Asherov