comparison dsp/signalconditioning/FiltFilt.cpp @ 283:5e125f030287

* Fixes to problems shown up by vamp-plugin-tester. Still not all plugins pass all tests, though
author Chris Cannam <c.cannam@qmul.ac.uk>
date Mon, 23 Mar 2009 16:28:53 +0000
parents 49844bc8a895
children e5907ae6de17
comparison
equal deleted inserted replaced
282:2703b3437aee 283:5e125f030287
46 46
47 void FiltFilt::process(double *src, double *dst, unsigned int length) 47 void FiltFilt::process(double *src, double *dst, unsigned int length)
48 { 48 {
49 unsigned int i; 49 unsigned int i;
50 50
51 if (length == 0) return;
52
51 unsigned int nFilt = m_ord + 1; 53 unsigned int nFilt = m_ord + 1;
52 unsigned int nFact = 3 * ( nFilt - 1); 54 unsigned int nFact = 3 * ( nFilt - 1);
53 unsigned int nExt = length + 2 * nFact; 55 unsigned int nExt = length + 2 * nFact;
54
55 56
56 m_filtScratchIn = new double[ nExt ]; 57 m_filtScratchIn = new double[ nExt ];
57 m_filtScratchOut = new double[ nExt ]; 58 m_filtScratchOut = new double[ nExt ];
58 59
59 60