-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfilter_fir_CF.h
More file actions
46 lines (29 loc) · 765 Bytes
/
filter_fir_CF.h
File metadata and controls
46 lines (29 loc) · 765 Bytes
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
#pragma once
#include "base.h"
#ifdef __cplusplus
namespace fastdsp {
namespace filter {
#endif
//! FIR filter structure
typedef struct {
cfloat *weights; //!< Weights
cfloat *buffer; //!< Circular buffer
count_t cb_index; //!< Circular index of buffer
count_t size; //!< Weights and buffer sizes
cfloat input; //!< Current input value
cfloat output; //!< Current output value
} fir_cf_t;
EXTERN int fir_init_CF(
fir_cf_t *fir,
cfloat *weights,
cfloat *buffer,
count_t size
);
EXTERN cfloat fir_process_CF(
fir_cf_t *fir,
cfloat input
);
#ifdef __cplusplus
} //namespace filter
} //namespace fastdsp
#endif