Basic Audio Signal Processing Library

Dependents:   unzen_sample_nucleo_f746 skeleton_unzen_nucleo_f746 ifmag_noise_canceller synthesizer_f746

オーディオ信号処理用のライブラリです。

mbed-dspのフィルタ群向けに作ったクラス・ラッパーのほか、以下のクラスを用意しています。

  • ヒステリシス
  • sin/cosオシレータ
  • リミッター

クラスは全て名前空間amakusaに含まれます。

Committer:
shorie
Date:
Fri Feb 10 13:24:30 2017 +0000
Revision:
5:3d6cf4dbf458
Parent:
1:0a37bce4f985
Child:
6:ed10856c2305
amakusa::AbstractFilter::run() ???blockSize ??????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shorie 1:0a37bce4f985 1 #ifndef _firdecimator_h_
shorie 1:0a37bce4f985 2 #define _firdecimator_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_decimate_f32() and the arm_fir_decimate_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 FIRDecimator : 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 input samples to be given to run() method at onece. Must be integer multiple of parameter M.
shorie 1:0a37bce4f985 20 * @param[in] M Down sampling ratio
shorie 1:0a37bce4f985 21 */
shorie 5:3d6cf4dbf458 22 FIRDecimator(uint16_t taps, float32_t *pCoeff, uint32_t block_size, uint8_t m);
shorie 1:0a37bce4f985 23 /**
shorie 1:0a37bce4f985 24 * Destructor
shorie 1:0a37bce4f985 25 */
shorie 1:0a37bce4f985 26 virtual ~FIRDecimator();
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 * @param[in] blockSize Number of the sample to be filitered. If skipped or zero, blockSize is assmued the one passed to the constructor. Must be integer multiple of parameter M of the constructor.
shorie 1:0a37bce4f985 32 */
shorie 5:3d6cf4dbf458 33 virtual void run( float32_t *pSrc, float32_t *pDst);
shorie 1:0a37bce4f985 34 private:
shorie 1:0a37bce4f985 35 arm_fir_decimate_instance_f32 state;
shorie 1:0a37bce4f985 36 };
shorie 1:0a37bce4f985 37
shorie 1:0a37bce4f985 38 }
shorie 1:0a37bce4f985 39
shorie 1:0a37bce4f985 40 #endif