1 // Comb filter class declaration
3 // Written by Jezar at Dreampoint, June 2000
4 // http://www.dreampoint.co.uk
5 // This code is public domain
10 #include "denormals.h"
14 *Takes multiple audio channels and mix them for one ear
20 void setbuffer(float *buf, int size);
21 inline float process(float inp);
23 void setdamp(float val);
25 void setfeedback(float val);
38 // Big to inline - but crucial for speed
40 inline float comb::process(float input)
43 * comb::process is not really ear-friendly the tunning values must
47 output = undenormalise( buffer[bufidx] );
49 filterstore = undenormalise(output*damp2);
51 buffer[bufidx] = input + filterstore*feedback;
53 if(++bufidx>=bufsize) bufidx = 0;