Cheaply generating coefficients for IIR/FIR given a cutoff frequency
A computationally cheap way to generate quick &amp; dirty FIR filter coefficients is to evaluate a windowed Sinc function.  Any rectangle in the frequency domain (low/high/bandpass) has a Sinc impulse response in the time domain, which can be windowed to a length roughly proportionally inverse in size to the desired width of the transition bands, and then sampled for some FIR coefficients.

About a dozen lines of BASIC pseudo code on my web page to do this should be trivial to convert to plain C : http://www.nicholson.com/rhn/dsp.html#2