Update qm-dsp library (v1.7.1-20-g4d15479)
[ardour.git] / libs / qm-dsp / dsp / signalconditioning / DFProcess.cpp
index 52443fb384bcc4c3b24a1348130945e4959790c3..7aa9649e6c50ec2f27475b85e4e15c0c60a56b60 100644 (file)
@@ -59,13 +59,11 @@ void DFProcess::initialise( DFProcConfig Config )
     filtSrc = new double[ m_length ];
     filtDst = new double[ m_length ];
 
-       
-    //Low Pass Smoothing Filter Config
-    m_FilterConfigParams.ord = Config.LPOrd;
-    m_FilterConfigParams.ACoeffs = Config.LPACoeffs;
-    m_FilterConfigParams.BCoeffs = Config.LPBCoeffs;
-       
-    m_FiltFilt = new FiltFilt( m_FilterConfigParams );
+    Filter::Parameters params;
+    params.a = std::vector<double>(Config.LPACoeffs, Config.LPACoeffs + Config.LPOrd + 1);
+    params.b = std::vector<double>(Config.LPBCoeffs, Config.LPBCoeffs + Config.LPOrd + 1);
+    
+    m_FiltFilt = new FiltFilt(params);
        
     //add delta threshold
     m_delta = Config.delta;
@@ -193,7 +191,7 @@ void DFProcess::removeDCNormalize( double *src, double*dst )
 
     MathUtilities::getAlphaNorm( src, m_length, m_alphaNormParam, &DFAlphaNorm );
 
-    for( unsigned int i = 0; i< m_length; i++)
+    for (int i = 0; i < m_length; i++)
     {
        dst[ i ] = ( src[ i ] - DFMin ) / DFAlphaNorm; 
     }