Basic Audio Signal Processing Library
Dependents: unzen_sample_nucleo_f746 skeleton_unzen_nucleo_f746 ifmag_noise_canceller synthesizer_f746
オーディオ信号処理用のライブラリです。
mbed-dspのフィルタ群向けに作ったクラス・ラッパーのほか、以下のクラスを用意しています。
- ヒステリシス
- sin/cosオシレータ
- リミッター
クラスは全て名前空間amakusaに含まれます。
firfilter.h@6:ed10856c2305, 2017-02-10 (annotated)
- Committer:
- shorie
- Date:
- Fri Feb 10 13:26:52 2017 +0000
- Revision:
- 6:ed10856c2305
- Parent:
- 5:3d6cf4dbf458
Document edited
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shorie | 1:0a37bce4f985 | 1 | #ifndef _firfilter_h_ |
shorie | 1:0a37bce4f985 | 2 | #define _firfilter_h_ |
shorie | 1:0a37bce4f985 | 3 | |
shorie | 1:0a37bce4f985 | 4 | #include "abstractfilter.h" |
shorie | 1:0a37bce4f985 | 5 | namespace amakusa |
shorie | 1:0a37bce4f985 | 6 | { |
shorie | 1:0a37bce4f985 | 7 | /** |
shorie | 1:0a37bce4f985 | 8 | * @brief Wrapper class of the arm_fir_f32() and the arm_fir_init_f32(). |
shorie | 1:0a37bce4f985 | 9 | * @details |
shorie | 1:0a37bce4f985 | 10 | * To use this class, include amakusa.h |
shorie | 1:0a37bce4f985 | 11 | */ |
shorie | 1:0a37bce4f985 | 12 | class FIRFilter : public AbstractFilter |
shorie | 1:0a37bce4f985 | 13 | { |
shorie | 1:0a37bce4f985 | 14 | public: |
shorie | 1:0a37bce4f985 | 15 | /** |
shorie | 1:0a37bce4f985 | 16 | * @brief Constructor |
shorie | 1:0a37bce4f985 | 17 | * @param[in] taps Number of the elements in the coeffisients array. Or length of the impuls response. |
shorie | 1:0a37bce4f985 | 18 | * @param[in] pCoeff Ponter to the coefficients array ( Impuls response ). |
shorie | 1:0a37bce4f985 | 19 | * @param[in] blockSize Maximum number of the samples to be given to run() method at onece. |
shorie | 1:0a37bce4f985 | 20 | */ |
shorie | 5:3d6cf4dbf458 | 21 | FIRFilter(uint16_t taps, float32_t *pCoeff, uint32_t block_size); |
shorie | 1:0a37bce4f985 | 22 | /** |
shorie | 1:0a37bce4f985 | 23 | * Destructor |
shorie | 1:0a37bce4f985 | 24 | */ |
shorie | 1:0a37bce4f985 | 25 | virtual ~FIRFilter(); |
shorie | 1:0a37bce4f985 | 26 | /** |
shorie | 1:0a37bce4f985 | 27 | * @brief Run the filter. |
shorie | 1:0a37bce4f985 | 28 | * @param[in] pSrc Pointer to the source buffer to be filtered. |
shorie | 1:0a37bce4f985 | 29 | * @param[out] pDst Pointer to the destination buffer to store the filtered signal. |
shorie | 1:0a37bce4f985 | 30 | */ |
shorie | 5:3d6cf4dbf458 | 31 | virtual void run( float32_t *pSrc, float32_t *pDst ); |
shorie | 1:0a37bce4f985 | 32 | private: |
shorie | 1:0a37bce4f985 | 33 | arm_fir_instance_f32 state; |
shorie | 1:0a37bce4f985 | 34 | }; |
shorie | 1:0a37bce4f985 | 35 | |
shorie | 1:0a37bce4f985 | 36 | } |
shorie | 1:0a37bce4f985 | 37 | |
shorie | 1:0a37bce4f985 | 38 | #endif |