diff options
author | Florian Jung <flo@windfisch.org> | 2011-09-27 16:08:57 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-09-27 16:08:57 +0000 |
commit | e9e38901f1b0c8b0d4c11f6de37abf7ff6c7234f (patch) | |
tree | 6db56ee33fda6adce28afc456c4fd84b56180453 /attic/muse_qt4_evolution/plugins/freeverb/comb.h | |
parent | 5c2eaaf143f517e1a4d52e243a761e479aeb3e5b (diff) | |
parent | d52fac00567bb85944188f3c946b86b2a420819c (diff) |
merged with trunk
Diffstat (limited to 'attic/muse_qt4_evolution/plugins/freeverb/comb.h')
-rw-r--r-- | attic/muse_qt4_evolution/plugins/freeverb/comb.h | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/attic/muse_qt4_evolution/plugins/freeverb/comb.h b/attic/muse_qt4_evolution/plugins/freeverb/comb.h deleted file mode 100644 index 22f5591b..00000000 --- a/attic/muse_qt4_evolution/plugins/freeverb/comb.h +++ /dev/null @@ -1,63 +0,0 @@ -// Comb filter class declaration -// -// Written by Jezar at Dreampoint, June 2000 -// http://www.dreampoint.co.uk -// This code is public domain - -#ifndef _comb_ -#define _comb_ - -#include "denormals.h" - - -//--------------------------------------------------------- -// comb -//--------------------------------------------------------- - -class comb - { - float feedback; - float filterstore; - float damp1; - float damp2; - float *buffer; - int bufsize; - int bufidx; - -public: - comb() { - filterstore = 0; - bufidx = 0; - } - void setbuffer(float *buf, int size) { - buffer = buf; - bufsize = size; - } - float process(float input) { - float output = buffer[bufidx]; - undenormalise(output); - filterstore = (output*damp2) + (filterstore*damp1); - undenormalise(filterstore); - buffer[bufidx] = input + (filterstore*feedback); - if (++bufidx >= bufsize) - bufidx = 0; -// bufidx = ++bufidx % bufsize; - return output; - } - void mute() { - for (int i=0; i<bufsize; i++) - buffer[i]=0; - } - void setdamp(float val) { - damp1 = val; - damp2 = 1-val; - } - float getdamp() { return damp1; } - void setfeedback(float val) { feedback = val; } - float getfeedback() { return feedback; } - }; - - -#endif //_comb_ - -//ends |