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"
16 void setbuffer(float *buf, int size);
17 inline float process(float inp);
19 void setdamp(float val);
21 void setfeedback(float val);
34 // Big to inline - but crucial for speed
36 inline float comb::process(float input)
40 output = undenormalise( buffer[bufidx] );
42 filterstore = undenormalise( output*damp2 + filterstore*damp1 );
44 buffer[bufidx] = input + filterstore*feedback;
46 if(++bufidx>=bufsize) bufidx = 0;