Do not play sounds if there's no window, or if it's inactive.