3#include "common/dsp/complex.h"
4#include "common/dsp/resamp/polyphase_bank.h"
13 class RationalResamplerBlock :
public BlockSimple<T, T>
16 float p_interpolation = 1;
17 float p_decimation = 2;
18 std::vector<float> p_taps = {};
20 bool needs_reinit =
false;
25 uint32_t in_buffer = 0;
32 int inc = 0, outc = 0;
35 dsp::PolyphaseBank pfb;
38 uint32_t
process(T *input, uint32_t nsamples, T *output);
41 RationalResamplerBlock();
42 ~RationalResamplerBlock();
48 nlohmann::ordered_json p;
49 add_param_simple(p,
"interpolation",
"float");
50 add_param_simple(p,
"decimation",
"float");
56 if (key ==
"interpolation")
57 return p_interpolation;
58 else if (key ==
"decimation")
61 throw satdump_exception(key);
66 if (key ==
"interpolation")
71 else if (key ==
"decimation")
77 throw satdump_exception(key);
cfg_res_t
set_cfg status.
Definition block.h:241
uint32_t process(T *input, uint32_t nsamples, T *output)
Simplified "work" function, called automatically by work(). This takes away all boilerplate work usua...
Definition rational_resampler.cpp:59
nlohmann::json get_cfg(std::string key)
Get parameters of the block as JSON.
Definition rational_resampler.h:54
nlohmann::ordered_json get_cfg_list()
Get parameters LIST of the block's parameters. This does not contain actual values,...
Definition rational_resampler.h:46
void init()
Applies current parameters to the block. This is called automatically once in start(),...
Definition rational_resampler.cpp:26
Block::cfg_res_t set_cfg(std::string key, nlohmann::json v)
Set parameters of the block from JSON, including potentially IO configurations for blocks that may ha...
Definition rational_resampler.h:64