Maximum delay for effective active noise cancelling? Active noise cancelling reduces unwanted sound by sending the inverted phase of the original phase:

(Source: Wikipedia)
Theoretically, this seems logical to me. However, in real life, the anti-noise must be created by some hardware or software system (like active noise cancelling headphones), which takes time. So I assume that the anti-noise is always delayed to the original sound:

My questions:


*

*How much (in milliseconds or whatever) is the maximum delay which is "allowed" for active noise cancelling so that the hearer of the noise+antinoise still notices the effect?

*Does the "allowed" delay depend on which noise has to be cancelled (e.g. a car driving, people speaking, music)?

 A: I'm no ANC expert but I'm pretty sure the limit you're talking about would have something to do with the Haas effect (also called precedence effect). 
from Everest's Master Handbook of Acoustics: 

"...Haas found that in the 5 to 35 msec delay range the sound from the delayed loudspeaker has to be increased more than 10dB over the direct before it sounded like an echo. This is the precedence effect, or Haas effect..."

I think integration time of the ear is the key here.  
35 milliseconds seems to be a commonly cited upper bound for this "non-echo" territory.
A: The key to this is the physical principle that the quantity you're asking about (delay between noise and noise cancelling) carries dimensional information (i.e. it's a time) and therefore it has to depend on the specific situation.
The simplest case is trying to cancel out a pure note, with a sinusoidal waveform, then the delay can be as long as you want: you just wait a whole number of periods and it doesn't change anything. (The delay precision, though, has to be quite high! The absolute delay can be as large as you want, but its precision must be much smaller than the pure note's period (1/its frequency) for the noise cancelling to work.)
A pure note, however, is not really a physical thing. All sounds have a finite duration, and therefore a more physical model is a finite waveform such as
 (image source)
Here it's clear that you can't wait forever, or the "noise cancelling" will just be an echo. The relevant timescale your delay must act on is that in which the pulse is changing. This is given by the input's bandwidth: you can represent your noise as a (Fourier) superposition of pure notes drawn over some interval of frequencies $[0,\nu_\text{max}]$; the shortest timescales over which the waveform can change are of the order of $1/\nu_\text{max}$. This is the maximum delay for the noise-cancelling system to be effective.
In practice, it works the other way. Such systems have a fixed delay, which determines which noise bandwidths they are effective against. Designers try to make their headphones effective against most usual sources of noise, but this can't always be managed. Some systems (including the headphones I'm currently wearing) include a choice of bandwidths - mine says "low" and "wide", best for trains and airplanes or viceversa - to adapt to different noise sources.
The bottom line, then, is an emphatic yes to your second question. The delay should be shorter than 1/(highest noise frequency) for whichever source you're dealing with.
