You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <math.h>
|
|
#include "dcblock.h"
|
|
|
|
using namespace daisysp;
|
|
|
|
void DcBlock::Init(float sample_rate)
|
|
{
|
|
output_ = 0.0;
|
|
input_ = 0.0;
|
|
gain_ = 0.99;
|
|
}
|
|
|
|
float DcBlock::Process(float in)
|
|
{
|
|
float out;
|
|
out = in - input_ + (gain_ * output_);
|
|
output_ = out;
|
|
input_ = in;
|
|
return out;
|
|
}
|
|
|