2022-09-16 03:16:58 +02:00
|
|
|
#include "FIR.h"
|
|
|
|
|
|
|
|
FIR::FIR() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
FIR::~FIR() {
|
|
|
|
delete this->offsetBlock;
|
|
|
|
delete this->coeffs;
|
|
|
|
delete this->block;
|
|
|
|
}
|
|
|
|
|
2022-09-19 04:30:42 +02:00
|
|
|
void FIR::FilterSamples(float *samples, uint32_t size) {
|
2022-09-16 03:16:58 +02:00
|
|
|
this->FilterSamplesInterleaved(samples, size, 1);
|
|
|
|
}
|
|
|
|
|
2022-09-19 04:30:07 +02:00
|
|
|
void FIR::FilterSamplesInterleaved(float *samples, uint32_t size, uint32_t channels) {
|
2022-09-16 03:16:58 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
int FIR::GetBlockLength() {
|
|
|
|
return this->blockLength;
|
|
|
|
}
|
|
|
|
|
2022-09-19 04:30:07 +02:00
|
|
|
int FIR::LoadCoefficients(const float *coeffs, uint32_t coeffsize, int blockLength) {
|
2022-09-16 03:16:58 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void FIR::Reset() {
|
|
|
|
if (this->offsetBlock != nullptr && this->coeffsize + this->blockLength > -1) {
|
|
|
|
for (int i = 0; i < this->coeffsize + this->blockLength; i++) {
|
|
|
|
this->offsetBlock[i] = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|