Re:Show HN: JavaScript Acid Techno Machine
by lachenmayer on Tuesday March 10, 2015 @05:22PM
(#9180742)
Really interesting what happens to the sound when you switch tabs (in Chrome at least): The sounds still play, but slowed down about 10x.
[ Parent
| on HN ]
Re:Show HN: JavaScript Acid Techno Machine
by meandave on Tuesday March 10, 2015 @05:42PM
(#9180859)
it is because chrome slows main thread js execution for inactive tabs. The solution is to do your scheduling (setInterval etc) in a web worker.
Re:Show HN: JavaScript Acid Techno Machine
by droidist2 on Tuesday March 10, 2015 @05:29PM
(#9180777)
Yeah, that's a common Web Audio hassle. On mobile it gets even crazier, although I haven't tried this site in mobile.
Re:Show HN: JavaScript Acid Techno Machine
by s_kilk on Wednesday March 11, 2015 @06:51AM
(#9183454)
For me, in Firefox on Yosemite, the slowdowns seem to come at random, even when the tab is in focus.
A workaround is to detach the tab and keep it visible. Then it doesn't need to be focused.
It sound awesome! Wouldn't want to work around that effect... hehe nifty.