Basic Audio Signal Processing Library

Dependents:   unzen_sample_nucleo_f746 skeleton_unzen_nucleo_f746 ifmag_noise_canceller synthesizer_f746

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

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

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

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

Revision:
1:0a37bce4f985
Child:
5:3d6cf4dbf458
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/firdecimator.cpp	Mon Jan 02 11:04:49 2017 +0000
@@ -0,0 +1,27 @@
+#include "amakusa.h"
+
+amakusa::FIRDecimator::FIRDecimator(uint16_t taps, float32_t *pCoeff, uint32_t blockSize, uint8_t m )
+     : AbstractFilter( blockSize )
+{
+    arm_fir_decimate_init_f32( 
+        &(this->state),
+        taps, 
+        m,
+        pCoeff,
+        new float32_t[taps+blockSize-1],
+        blockSize);
+}
+
+amakusa::FIRDecimator::~FIRDecimator()
+{
+    delete [] this->state.pState;
+}
+void amakusa::FIRDecimator::run( float32_t *pSrc, float32_t *pDst, uint32_t blockSize )
+{
+    arm_fir_decimate_f32( 
+        & this->state, 
+        pSrc, 
+        pDst, 
+        blockSize ? blockSize : this->blockSize
+        );
+}
\ No newline at end of file