@Override public double[] analyse(double[] frame){
  if (frame.length != getFrameLengthSamples())   throw new IllegalArgumentException("Expected frame of length " + getFrameLengthSamples() + ", got "+ frame.length);
  System.arraycopy(frame,0,real,0,frame.length);
  if (real.length > frame.length)   Arrays.fill(real,frame.length,real.length,0);
  FFT.realTransform(real,false);
  return FFT.computePowerSpectrum_FD(real);
}

@ Override public double [ ] analyse ( double [ ] frame ) { if ( frame . length != getFrameLengthSamples ( ) ) throw new IllegalArgumentException ( "Expected frame of length " + getFrameLengthSamples ( ) + ", got " + frame . length ) ; System . arraycopy ( frame , 0 , real , 0 , frame . length ) ; if ( real . length > frame . length ) Arrays . fill ( real , frame . length , real . length , 0 ) ; FFT . realTransform ( real , false ) ; return FFT . computePowerSpectrum_FD ( real ) ; }
apply this framebasedanalyser to the given data .
