Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
lachenmayer
· 11y ago · 0 comments
Really interesting what happens to the sound when you switch tabs (in Chrome at least): The sounds still play, but slowed down about 10x.
Comments
[–]
meandave
11y ago
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.
[–]
droidist2
11y ago
Yeah, that's a common Web Audio hassle. On mobile it gets even crazier, although I haven't tried this site in mobile.
[–]
s_kilk
11y ago
For me, in Firefox on Yosemite, the slowdowns seem to come at random, even when the tab is in focus.
[–]
jkbr
11y ago
A workaround is to detach the tab and keep it visible. Then it doesn't need to be focused.
[–]
grayfox
11y ago
It sound awesome! Wouldn't want to work around that effect... hehe nifty.
[–]
nunull
11y ago
Quite nice live gadget!