public void receive(float[] currentFFTBins){
  if (Float.isInfinite(currentFFTBins[0]) || Float.isNaN(currentFFTBins[0])) {
    currentFFTBins=new float[currentFFTBins.length];
  }
  if (mDisplayFFTBins == null || mDisplayFFTBins.length != currentFFTBins.length) {
    mDisplayFFTBins=currentFFTBins;
  }
  float[] smoothedBins=mSmoothingFilter.filter(currentFFTBins);
  if (mAveraging > 1) {
    float gain=1.0f / (float)mAveraging;
    for (int x=0; x < mDisplayFFTBins.length; x++) {
      mDisplayFFTBins[x]+=(smoothedBins[x] - mDisplayFFTBins[x]) * gain;
    }
  }
 else {
    mDisplayFFTBins=smoothedBins;
  }
  repaint();
}

public void receive ( float [ ] currentFFTBins ) { if ( Float . isInfinite ( currentFFTBins [ 0 ] ) || Float . isNaN ( currentFFTBins [ 0 ] ) ) { currentFFTBins = new float [ currentFFTBins . length ] ; } if ( mDisplayFFTBins == null || mDisplayFFTBins . length != currentFFTBins . length ) { mDisplayFFTBins = currentFFTBins ; } float [ ] smoothedBins = mSmoothingFilter . filter ( currentFFTBins ) ; if ( mAveraging > 1 ) { float gain = 1.0f / ( float ) mAveraging ; for ( int x = 0 ; x < mDisplayFFTBins . length ; x ++ ) { mDisplayFFTBins [ x ] += ( smoothedBins [ x ] - mDisplayFFTBins [ x ] ) * gain ; } } else { mDisplayFFTBins = smoothedBins ; } repaint ( ) ; }
dftresultslistener interface for receiving the processed data to display
