diff options
author | Robert Jonsson <spamatica@gmail.com> | 2011-09-15 12:14:55 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2011-09-15 12:14:55 +0000 |
commit | b0546e5e7f7044019892543c6c82029db8d564a7 (patch) | |
tree | 1b96a6260900f3fbf3513fb48a5a72aa89052dc8 /attic/muse_qt4_evolution/plugins/freeverb/allpass.h | |
parent | 583c73d1a07154d3d2672d65d8cce6495f490454 (diff) |
moved attic to a branch of it's own
Diffstat (limited to 'attic/muse_qt4_evolution/plugins/freeverb/allpass.h')
-rw-r--r-- | attic/muse_qt4_evolution/plugins/freeverb/allpass.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/attic/muse_qt4_evolution/plugins/freeverb/allpass.h b/attic/muse_qt4_evolution/plugins/freeverb/allpass.h deleted file mode 100644 index 2f27691e..00000000 --- a/attic/muse_qt4_evolution/plugins/freeverb/allpass.h +++ /dev/null @@ -1,47 +0,0 @@ -// Allpass filter declaration -// -// Written by Jezar at Dreampoint, June 2000 -// http://www.dreampoint.co.uk -// This code is public domain - -#ifndef _allpass_ -#define _allpass_ -#include "denormals.h" - -//--------------------------------------------------------- -// allpass -//--------------------------------------------------------- - -class allpass - { - float feedback; - float *buffer; - int bufsize; - int bufidx; - - public: - allpass() { bufidx = 0; } - void setbuffer(float *buf, int size) { - buffer = buf; - bufsize = size; - } - float process(float input) { - float bufout = buffer[bufidx]; - undenormalise(bufout); - float output = -input + bufout; - buffer[bufidx] = input + (bufout*feedback); - if (++bufidx >= bufsize) - bufidx = 0; -// bufidx = ++bufidx % bufsize; - return output; - } - void mute() { - for (int i=0; i<bufsize; i++) - buffer[i]=0; - } - void setfeedback(float val) { feedback = val; } - float getfeedback() { return feedback; } - }; - - -#endif//_allpass |