blob: 4100283461a29771632364a23c149549fbce5691 [file] [log] [blame]
Tom Tsou35222292016-06-22 16:16:30 -07001#ifndef _SYNTHESIS_H_
2#define _SYNTHESIS_H_
3
4#include "ChannelizerBase.h"
5
6class Synthesis : public ChannelizerBase {
7public:
8 /** Constructor for synthesis filterbank
9 @param m number of physical channels
10 @param blockLen number of samples per output of each iteration
11 @param hLen number of taps in each constituent filter path
12 */
13 Synthesis(size_t m, size_t blockLen, size_t hLen = 16);
14 ~Synthesis();
15
16 /* Return required input and output buffer lengths */
17 size_t inputLen() const;
18 size_t outputLen() const;
19
20 /** Rotate "output commutator" and drive samples through filterbank
21 @param out complex output vector
22 @param oLen number of samples in buffer (must match block length * m)
23 @return false on error and true otherwise
24 */
25 bool rotate(float *out, size_t oLen);
26
27 /** Get buffer for an input path
28 @param chan channel number of filterbank
29 @return NULL on error and pointer to buffer otherwise
30 */
31 float *inputBuffer(size_t chan) const;
32 bool resetBuffer(size_t chan);
33};
34
35#endif /* _SYNTHESIS_H_ */