News for hackers. Stuff that matters.
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.
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.
Re:Show HN: JavaScript Acid Techno Machine by jkbr on Tuesday March 10, 2015 @06:19PM (#9181107)
A workaround is to detach the tab and keep it visible. Then it doesn't need to be focused.
Re:Show HN: JavaScript Acid Techno Machine by grayfox on Tuesday March 10, 2015 @06:33PM (#9181205)
It sound awesome! Wouldn't want to work around that effect... hehe nifty.
Re:Show HN: JavaScript Acid Techno Machine by nunull on Wednesday March 11, 2015 @04:58AM (#9183193)
Quite nice live gadget!