Basic Audio Signal Processing Library
Dependents: unzen_sample_nucleo_f746 skeleton_unzen_nucleo_f746 ifmag_noise_canceller synthesizer_f746
biquadcascadedf1.h
00001 #ifndef _BIQUADCASCADEDF1_H_ 00002 #define _BIQUADCASCADEDF1_H_ 00003 00004 #include "abstractfilter.h" 00005 namespace amakusa 00006 { 00007 /** 00008 * @brief Wrapper class of the arm_biquad_cascade_df1_f32() and the arm_biquad_cascade_df1_init_f32(). 00009 * @details 00010 * To use this class, include amakusa.h 00011 * 00012 * The biquad filter is depicted as following. The pCoeff array has b0, b1, b2, a1, a2 parameter 00013 * by this order. If the stage is N, N blockes of these parameers are given. The length of pCoeff 00014 * is 5N. 00015 * @code 00016 x[n]---+-- b0 -->+---------+---y[n] 00017 | ^ | 00018 D | | 00019 +-- b1 -->+<-- a1 --+ 00020 D | | 00021 +-- b2 -->+<-- a2 --+ 00022 * @endcode 00023 */ 00024 class BiQuadCascadeDF1 : public AbstractFilter 00025 { 00026 public: 00027 /** 00028 * @brief Constructor 00029 * @param[in] stages Number of the Bi-Quad stages. 00030 * @param[in] pCoeff Ponter to the coefficients array. 00031 * @param[in] blockSize Maximum number of the samples to be given to run() method at onece. 00032 */ 00033 BiQuadCascadeDF1(uint16_t stages, float32_t *pCoeff, uint32_t block_size); 00034 /** 00035 * deconstructor 00036 */ 00037 virtual ~BiQuadCascadeDF1(); 00038 /** 00039 * @brief Run the filter. 00040 * @param[in] pSrc Pointer to the source buffer to be filtered. 00041 * @param[out] pDst Pointer to the destination buffer to store the filtered signal. 00042 */ 00043 virtual void run( float32_t *pSrc, float32_t *pDst ); 00044 private: 00045 arm_biquad_casd_df1_inst_f32 state; 00046 }; 00047 00048 } 00049 00050 #endif
Generated on Tue Jul 12 2022 21:49:23 by 1.7.2