Basic Audio Signal Processing Library
Dependents: unzen_sample_nucleo_f746 skeleton_unzen_nucleo_f746 ifmag_noise_canceller synthesizer_f746
オーディオ信号処理用のライブラリです。
mbed-dspのフィルタ群向けに作ったクラス・ラッパーのほか、以下のクラスを用意しています。
- ヒステリシス
- sin/cosオシレータ
- リミッター
クラスは全て名前空間amakusaに含まれます。
firinterpolator.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 _firinterpolator_h_ |
shorie | 1:0a37bce4f985 | 2 | #define _firinterpolator_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_interpolate_f32() and the arm_fir_interpolate_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 FIRInterpolator : 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. The taps must be integer multiple of L |
shorie | 1:0a37bce4f985 | 18 | * @param[in] pCoeff Ponter to the coefficients array ( Impuls response ). |
shorie | 5:3d6cf4dbf458 | 19 | * @param[in] block_size Maximum number of the input samples to be given to run() method at onece. |
shorie | 1:0a37bce4f985 | 20 | * @param[in] L Up sampling ratio |
shorie | 1:0a37bce4f985 | 21 | */ |
shorie | 5:3d6cf4dbf458 | 22 | FIRInterpolator(uint16_t taps, float32_t *pCoeff, uint32_t block_size, uint8_t L); |
shorie | 1:0a37bce4f985 | 23 | /** |
shorie | 1:0a37bce4f985 | 24 | * Destructor |
shorie | 1:0a37bce4f985 | 25 | */ |
shorie | 1:0a37bce4f985 | 26 | virtual ~FIRInterpolator(); |
shorie | 1:0a37bce4f985 | 27 | /** |
shorie | 1:0a37bce4f985 | 28 | * @brief Run the filter. |
shorie | 1:0a37bce4f985 | 29 | * @param[in] pSrc Pointer to the source buffer to be filtered. |
shorie | 1:0a37bce4f985 | 30 | * @param[out] pDst Pointer to the destination buffer to store the filtered signal. |
shorie | 1:0a37bce4f985 | 31 | */ |
shorie | 5:3d6cf4dbf458 | 32 | virtual void run( float32_t *pSrc, float32_t *pDst); |
shorie | 1:0a37bce4f985 | 33 | private: |
shorie | 1:0a37bce4f985 | 34 | arm_fir_interpolate_instance_f32 state; |
shorie | 1:0a37bce4f985 | 35 | }; |
shorie | 1:0a37bce4f985 | 36 | |
shorie | 1:0a37bce4f985 | 37 | } |
shorie | 1:0a37bce4f985 | 38 | |
shorie | 1:0a37bce4f985 | 39 | #endif |