Acoustic feedback detection algorithm I am woking on an sound processing application where I have limited processing resources. I need to be able to detect acoustic feedback and then signal that such an event occurred. I am not concerned with the more complex task of feedback cancellation, in which the detection circuit would (presumably) need to output accurate information about the frequency and intensity of the detected feedback. 

I just need to reliably detect feedback, while rejecting false positives that might come about from 'genuine' harmonic input to the system.

A time domain solution would be preferable. Can anyone suggest such a solution?
I assume here that your device is not in the feedback chain.

If you can't afford a FFT or filter-bank decomposition (and then detect over successive frames the FFT bins in which the amplitude gets almost exactly multiplied by the same complex number over successive frames), I would suggest looking at these few parameters:


Fit a line to the log of the RMS envelope (computed on 50 or 100ms windows) over the past 2 seconds. Compute the slope, compute the coefficient of correlation. First should be positive, the second should be close to 1 for a feedback build-up, which is exponential.
Compute the standard deviation of the zero-crossing intervals. This is a cheap harmonicity measure, and it should go close to zero as a pure tone settles in and overwhelms the signal.
% of clipped samples. Seeing clipping is a bad omen - but maybe it's too late for you?


You should get by with a few decision rules based on these criteria.

Now, if your device is in the feedback loop (eg: audio DSP box, hearing aid), things are easier because you can "challenge" what you think is a feedback frequency by inducing a delay in the processing chain, or more subtly an all-pass filter (to delay only the suspicious frequency), and if you notice a change in the frequency of the suspect peak, you get a confirmation that it was induced by feedback rather than coming from the input signal.