-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiirfilterchain.h
45 lines (30 loc) · 963 Bytes
/
iirfilterchain.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
This file is part of WaverIIR
Copyright (C) 2021 Peter Papp
Please visit https://launchpad.net/waveriir for details
*/
#ifndef IIRFILTERCHAIN_H
#define IIRFILTERCHAIN_H
#include <QList>
#include "coefficientlist.h"
#include "iirfilter.h"
class IIRFilterChain {
public:
static const int MAX_FILTERS = 50;
// constructors and destructor
IIRFilterChain();
IIRFilterChain(QList<CoefficientList> coefficientLists);
~IIRFilterChain();
// filter management
void appendFilter(CoefficientList coefficientList);
IIRFilter *getFilter(int index);
int getFilterCount();
// filtering
void processPCMData(void *data, int byteCount, IIRFilter::SampleTypes sampleType, int channelCount);
void reset();
private:
// filters
int filterCount;
IIRFilter *filters[MAX_FILTERS];
};
#endif // IIRFILTERCHAIN_H