mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-12-09 21:16:25 -05:00
Rebased code from new eried repo commits. Changed to to reflect strijar implementation. Fixed previous issue with old ssb-am-tx ui_mictx code.
This commit is contained in:
parent
603b7fb1ab
commit
f65852ff05
20 changed files with 1545 additions and 16 deletions
|
|
@ -31,6 +31,9 @@ struct iir_biquad_config_t {
|
|||
std::array<float, 3> a;
|
||||
};
|
||||
|
||||
// 0..2 - b, 3..5 - a
|
||||
typedef std::array<float, 6> iir_biquad_df2_config_t;
|
||||
|
||||
constexpr iir_biquad_config_t iir_config_passthrough {
|
||||
{ { 1.0f, 0.0f, 0.0f } },
|
||||
{ { 0.0f, 0.0f, 0.0f } },
|
||||
|
|
@ -67,4 +70,21 @@ private:
|
|||
std::array<float, 3> y { { 0.0f, 0.0f, 0.0f } };
|
||||
};
|
||||
|
||||
class IIRBiquadDF2Filter {
|
||||
public:
|
||||
|
||||
void configure(const iir_biquad_df2_config_t& config);
|
||||
float execute(float z);
|
||||
|
||||
private:
|
||||
float b0 = 0;
|
||||
float b1 = 0;
|
||||
float b2 = 0;
|
||||
float a1 = 0;
|
||||
float a2 = 0;
|
||||
|
||||
float z0 = 0;
|
||||
float z1 = 0;
|
||||
};
|
||||
|
||||
#endif/*__DSP_IIR_H__*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue