2022-09-16 03:16:58 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
class FIR {
|
|
|
|
public:
|
|
|
|
FIR();
|
|
|
|
~FIR();
|
|
|
|
|
2022-09-19 04:30:42 +02:00
|
|
|
void FilterSamples(float *samples, uint32_t size);
|
2022-09-19 04:30:07 +02:00
|
|
|
void FilterSamplesInterleaved(float *samples, uint32_t size, uint32_t channels);
|
2022-09-16 03:16:58 +02:00
|
|
|
int GetBlockLength();
|
2022-09-19 04:30:07 +02:00
|
|
|
int LoadCoefficients(const float *coeffs, uint32_t coeffsize, int blockLength);
|
2022-09-16 03:16:58 +02:00
|
|
|
void Reset();
|
|
|
|
|
|
|
|
private:
|
|
|
|
int *offsetBlock;
|
|
|
|
float *coeffs;
|
|
|
|
float *block;
|
|
|
|
int coeffsize;
|
|
|
|
int blockLength;
|
|
|
|
bool enabled;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|