示例#1
0
  public void setWindowType(WindowType windowType) {
    mWindowType = windowType;

    if (mSampleType == SampleType.COMPLEX) {
      mWindow = Window.getWindow(mWindowType, mDFTSize.getSize() * 2);
    } else {
      mWindow = Window.getWindow(mWindowType, mDFTSize.getSize());
    }
  }
示例#2
0
  private void calculate() {
    float[] samples = getSamples();

    Window.apply(mWindow, samples);

    if (mSampleType == SampleType.REAL) {
      mFFT.realForward(samples);
    } else {
      mFFT.complexForward(samples);
    }

    dispatch(samples);
  }