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.cpp@1:0a37bce4f985, 2017-01-02 (annotated)
- Committer:
- shorie
- Date:
- Mon Jan 02 11:04:49 2017 +0000
- Revision:
- 1:0a37bce4f985
- Child:
- 5:3d6cf4dbf458
Wrapper classes of the mbed-dsp filter
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shorie | 1:0a37bce4f985 | 1 | #include "amakusa.h" |
shorie | 1:0a37bce4f985 | 2 | |
shorie | 1:0a37bce4f985 | 3 | amakusa::FIRInterpolator::FIRInterpolator(uint16_t taps, float32_t *pCoeff, uint32_t blockSize, uint8_t L ) |
shorie | 1:0a37bce4f985 | 4 | : AbstractFilter( blockSize ) |
shorie | 1:0a37bce4f985 | 5 | { |
shorie | 1:0a37bce4f985 | 6 | arm_fir_interpolate_init_f32( |
shorie | 1:0a37bce4f985 | 7 | &(this->state), |
shorie | 1:0a37bce4f985 | 8 | L, |
shorie | 1:0a37bce4f985 | 9 | taps, |
shorie | 1:0a37bce4f985 | 10 | pCoeff, |
shorie | 1:0a37bce4f985 | 11 | new float32_t[taps/L+blockSize-1], |
shorie | 1:0a37bce4f985 | 12 | blockSize); |
shorie | 1:0a37bce4f985 | 13 | } |
shorie | 1:0a37bce4f985 | 14 | |
shorie | 1:0a37bce4f985 | 15 | amakusa::FIRInterpolator::~FIRInterpolator() |
shorie | 1:0a37bce4f985 | 16 | { |
shorie | 1:0a37bce4f985 | 17 | delete [] this->state.pState; |
shorie | 1:0a37bce4f985 | 18 | } |
shorie | 1:0a37bce4f985 | 19 | void amakusa::FIRInterpolator::run( float32_t *pSrc, float32_t *pDst, uint32_t blockSize ) |
shorie | 1:0a37bce4f985 | 20 | { |
shorie | 1:0a37bce4f985 | 21 | arm_fir_interpolate_f32( |
shorie | 1:0a37bce4f985 | 22 | & this->state, |
shorie | 1:0a37bce4f985 | 23 | pSrc, |
shorie | 1:0a37bce4f985 | 24 | pDst, |
shorie | 1:0a37bce4f985 | 25 | blockSize ? blockSize : this->blockSize |
shorie | 1:0a37bce4f985 | 26 | ); |
shorie | 1:0a37bce4f985 | 27 | } |