mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-15 01:57:50 +00: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:
@@ -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__*/
|
||||
|
Reference in New Issue
Block a user