shithub: pt2-clone

ref: 1e0ed4cfef0787d6d538e72cf587e4bf5e8d1da2
dir: /src/pt2_rcfilter.h/

View raw version
#pragma once

#include <stdint.h>
#include <stdbool.h>

typedef struct rcFilter_t
{
	double tmp[2], c1, c2;
} rcFilter_t;

void calcRCFilterCoeffs(double sr, double hz, rcFilter_t *f);
void clearRCFilterState(rcFilter_t *f);
void RCLowPassFilterStereo(rcFilter_t *f, const double *in, double *out);
void RCHighPassFilterStereo(rcFilter_t *f, const double *in, double *out);
void RCLowPassFilter(rcFilter_t *f, const double in, double *out);
void RCHighPassFilter(rcFilter_t *f, const double in, double *out);