Considering the fact that it takes about 60 microseconds for sound to travel about 2cm, you only have about 900 cycles (assuming the same clock speed as an Arduino: 16MHz) to process the input sound, do a fast Fourier transform of the noise, and output the cancellation wave. I severely doubt that it can be implemented to be that fast. And not to mention that spikes in sound aren't nicely dealt with in Fourier transforms, so it's unlikely to actually remove the noise properly.