// Allpass filter implementation // // Written by Jezar at Dreampoint, June 2000 // http://www.dreampoint.co.uk // This code is public domain #include "freeverb.h" allpass::allpass() { bufidx = 0; } void allpass::setbuffer(float *buf, int size) { buffer = buf; bufsize = size; } void allpass::mute() { for (int i=0; i= freezemode) return; for (i=0;i 0) { int i; outL = outR = 0; input = (*inputL + *inputR) * gain; // Implementation of 2-stage IIR single-pole low-pass filter // found at the entrance of reverb processing on real devices filtprev1 += (input - filtprev1) * filtval; filtprev2 += (filtprev1 - filtprev2) * filtval; input = filtprev2; int s = -1; // Accumulate comb filters in parallel for (i=0; i= freezemode) { roomsize1 = 1; damp1 = 0; gain = muted; } else { roomsize1 = roomsize; damp1 = damp; gain = fixedgain; } for (i=0; i= freezemode) return 1; else return 0; } void revmodel::setfiltval(float value) { filtval = value; }