Convert to using floats.

This commit is contained in:
Jonathan Naylor 2020-04-18 16:48:30 +01:00
parent 6d5b864cba
commit ebdba2bdb9
3 changed files with 102 additions and 62 deletions

View file

@ -27,11 +27,17 @@ public:
uint8_t setParams(uint8_t frequency, uint8_t threshold);
bool process(const q15_t* samples, uint8_t length);
bool process(q15_t* samples, uint8_t length);
void reset();
private:
q31_t m_coeffDivTwo;
uint8_t m_threshold;
float32_t m_coeff;
float32_t m_threshold;
uint16_t m_count;
float m_q0;
float m_q1;
bool m_result;
};
#endif