@Override public void applyInline(double[] data,int pos,int len){
  int i;
  double[] dataOut=new double[len];
  if (len > real.length) {
    throw new IllegalArgumentException("Length must not be larger than FFT size");
  }
  int middle=len / 2 + len % 2;
  System.arraycopy(data,0,dataOut,0,len);
  System.arraycopy(dataOut,pos + middle,real,0,len - middle);
  System.arraycopy(dataOut,pos,real,real.length - middle,middle);
  if (real.length > len)   Arrays.fill(real,len - middle,real.length - middle,0);
  Arrays.fill(imag,0,imag.length,0.);
  FFT.transform(real,imag,false);
  process(real,imag);
  FFT.transform(real,imag,true);
  System.arraycopy(real,0,dataOut,pos + middle,len - middle);
  System.arraycopy(real,real.length - middle,dataOut,pos,middle);
  double origAvgEnergy=SignalProcUtils.getAverageSampleEnergy(data,len);
  for (i=0; i < len; i++)   data[i]=amount * dataOut[i] + oneMinusAmount * data[i];
  double newAvgEnergy=SignalProcUtils.getAverageSampleEnergy(data,len);
  double scale=origAvgEnergy / newAvgEnergy;
  for (i=0; i < len; i++)   data[i]*=0.8 * scale;
}

@ Override public void applyInline ( double [ ] data , int pos , int len ) { int i ; double [ ] dataOut = new double [ len ] ; if ( len > real . length ) { throw new IllegalArgumentException ( "Length must not be larger than FFT size" ) ; } int middle = len / 2 + len % 2 ; System . arraycopy ( data , 0 , dataOut , 0 , len ) ; System . arraycopy ( dataOut , pos + middle , real , 0 , len - middle ) ; System . arraycopy ( dataOut , pos , real , real . length - middle , middle ) ; if ( real . length > len ) Arrays . fill ( real , len - middle , real . length - middle , 0 ) ; Arrays . fill ( imag , 0 , imag . length , 0. ) ; FFT . transform ( real , imag , false ) ; process ( real , imag ) ; FFT . transform ( real , imag , true ) ; System . arraycopy ( real , 0 , dataOut , pos + middle , len - middle ) ; System . arraycopy ( real , real . length - middle , dataOut , pos , middle ) ; double origAvgEnergy = SignalProcUtils . getAverageSampleEnergy ( data , len ) ; for ( i = 0 ; i < len ; i ++ ) data [ i ] = amount * dataOut [ i ] + oneMinusAmount * data [ i ] ; double newAvgEnergy = SignalProcUtils . getAverageSampleEnergy ( data , len ) ; double scale = origAvgEnergy / newAvgEnergy ; for ( i = 0 ; i < len ; i ++ ) data [ i ] *= 0.8 * scale ; }
apply this frequency domain processor to the given data , and return the processing result in - place .
