From ba5cd463f0387255885b9c05b2a0f6f2ab17aa49 Mon Sep 17 00:00:00 2001 From: Kevin Larke Date: Fri, 29 May 2015 11:22:44 -0700 Subject: [PATCH] cmProc2.h : Changed name of cmFIRTest() to cmFIRTest0(). Added cmFIRTest1(). --- cmProc2.c | 37 ++++++++++++++++++++++++++++++++++--- cmProc2.h | 7 ++++--- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/cmProc2.c b/cmProc2.c index cf51911..7bc4051 100644 --- a/cmProc2.c +++ b/cmProc2.c @@ -823,7 +823,7 @@ cmRC_t cmFIRInitKaiser( cmFIR* p, unsigned procSmpCnt, double srate, double pass // in practice the ripple must be equal in the stop and pass band - so take the minimum between the two double d = cmMin(dPass,dStop); - // convert the ripple bcmk to db + // convert the ripple back to db double A = -20 * log10(d); // compute the kaiser alpha coeff @@ -914,7 +914,7 @@ cmRC_t cmFIRExec( cmFIR* p, const cmSample_t* sbp, unsigned sn ) // calc the output sample while( cbpoutV, 1, f->outN ); + cmVectArrayWriteMatrixS(ctx, sfn, x, 1, N ); + + cmFIRFree(&f); + +} + //------------------------------------------------------------------------------------------------------------ diff --git a/cmProc2.h b/cmProc2.h index 169c594..5f52342 100644 --- a/cmProc2.h +++ b/cmProc2.h @@ -190,8 +190,9 @@ extern "C" { cmRC_t cmFIRInitSinc( cmFIR* p, unsigned procSmpCnt, double srate, unsigned sincSmpCnt, double fcHz, unsigned flags, const double* wndV ); cmRC_t cmFIRFinal( cmFIR* p ); cmRC_t cmFIRExec( cmFIR* p, const cmSample_t* sp, unsigned sn ); - void cmFIRTest(); - + void cmFIRTest0( cmRpt_t* rpt, cmLHeapH_t lhH, cmSymTblH_t stH ); + void cmFIRTest1( cmCtx* ctx ); + //------------------------------------------------------------------------------------------------------------ // Apply a generic function to a windowed signal with a one sample hop size. @@ -771,7 +772,7 @@ extern "C" { //------------------------------------------------------------------------------------------------------------ - // cmVectArray buffers row vectors of arbitrary lenght in memory. + // cmVectArray buffers row vectors of arbitrary length in memory. // The buffers may then be access using the cmVectArrayGetXXX() functions. // The entire contents of the file may be written to a file using atVectArrayWrite(). // The file may then be read in back into memory using cmVectArrayAllocFromFile()